-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.sh
executable file
·46 lines (35 loc) · 1.01 KB
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# Uninstall the idleout daemon.
# Marcos Moyano - [email protected]
LOCAL="`pwd`"
BINDIR="/sbin"
CONFDIR="/etc"
CONFFILE="$CONFDIR/idleout"
INITDIR="$CONFDIR/init.d"
FILES="$LOCAL/src"
MAN="/usr/share/man/man1/"
#MAN="`echo $MANPATH | cut -d: -f 1`/man1/"
echo "Start removing ... "
sleep 5
echo "Removing idleout to startup services ..."
$BINDIR/chkconfig --del idleout || echo -e "Error removing idleout from startup services.\n \
Please run: $BINDIR/chkconfig --del idleout "
sleep 5
if [ -f $INITDIR/idleout ]; then
echo "Removing idleout --> $INITDIR/idleout"
rm -f $INITDIR/idleout
fi
if [ -f $BINDIR/idleoutd ]; then
echo "Removing idleoutd --> $BINDIR/idleoutd"
rm -f $BINDIR/idleoutd
echo "Removing usrout --> $BINDIR/usrout"
rm -f $BINDIR/usrout
fi
[ -d $CONFFILE ] || rm -rf $CONFFILE
if [ -f $MAN/idleoutd.1.gz ]; then
echo "Removing (1) --> $MAN/idleoutd.1.gz"
echo " --> $MAN/usrout.1.gz"
rm -f $MAN/idleoutd.1.gz
rm -f $MAN/usrout.1.gz
fi
echo "Finishing removing ... "