updated on Fri Jan 20 04:00:45 UTC 2012
[aur-mirror.git] / slim-cursor / slim
blob686d060d52a1523cfaa7915f09c52a18a4ffb153
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 lockfile=$(grep lockfile /etc/slim.conf |tr -s " " | cut -d" " -f2)
7 pid=$(pidof -o %PPID /usr/bin/slim)
9 case "$1" in
10 start)
11 stat_busy "Starting Simple Login Manager"
12 [ -z "$pid" ] && /usr/bin/slim -d >/dev/null 2>&1
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon slim
17 stat_done
20 stop)
21 stat_busy "Stopping Simple Login Manager"
22 rm -f $lockfile
23 [ ! -z "$pid" ] && kill $pid >/dev/null 2>&1
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon slim
28 stat_done
31 restart)
32 $0 stop
33 sleep 3
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
40 exit 0