updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / slim-unicode / rc.d
blobdcf2b1e04a05d4a186972a232f7abbb38ac5ef9a
1 #!/bin/bash
3 . /etc/rc.conf
4 export DAEMON_LOCALE=yes
5 . /etc/rc.d/functions
7 PID=`pidof -o %PPID /usr/share/slim/bin/slim`
8 case "$1" in
9 start)
10 stat_busy "Starting Simple Login Manager"
11 [ -z "$PID" ] && /usr/share/slim/bin/slim -d &> /dev/null
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon slim
16 stat_done
19 stop)
20 stat_busy "Stopping Simple Login Manager"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon slim
26 stat_done
29 restart)
30 $0 stop
31 sleep 3
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
37 exit 0