#!/bin/csh
#
#
# Script to remove license server installation
#

set BELL = "\007"

if ( `whoami` != "root" ) then
    #$CLEAR
    echo
    echo $BELL
    echo '*** Deletion Problem:'
    echo '    You are not running this script logged in as root,'
    echo '    or your user id is not 0'
    echo 
    echo '    You are logged in as: '`whoami`
    echo
    exit 0
endif

echo
echo $BELL
echo
echo === WARNING: This script will delete your
echo license server installation files and your
echo licenses as well. 
echo
echo 'Do you want to continue? [y/n]: \c'
set input = $<
if ("$input" != "Y" && "$input" != "y") then
    echo
    echo 'Adios.'
    echo
    exit 0
endif

echo
echo Removing all license files
killall jaleolicd

rm /etc/config/jaleolic
rm /etc/rc2.d/S98jaleolic
rm /etc/rc0.d/K98jaleolic
rm /etc/init.d/jaleolic

rm -r /usr/lib/elm/jaleo
