blob: 428d1982b62bbbcb732672bef7167ee411b404c5 (
plain)
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
|
#!/bin/sh
# Begin $rc_base/init.d/slim
# $Id: $
. /etc/sysconfig/rc
. $rc_functions
lockfile=$(grep lockfile /etc/slim.conf |tr -s " " | cut -d" " -f2)
pid=$(pidof -o %PPID /usr/X11R6/bin/X)
case "$1" in
start)
boot_mesg "Starting Simple Login Manager"
loadproc /usr/bin/slim -d
;;
stop)
boot_mesg "Stopping Simple Login Manager"
if [ -f $lockfile ]; then
rm $lockfile
fi
[ ! -z "$pid" ] && kill $pid >/dev/null 2>&1
if [ $? -gt 0 ]; then
killproc /usr/bin/slim
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 start|stop|restart"
;;
esac
# End of file
|