diff options
author | root <root@rshg047.dnsready.net> | 2011-04-30 22:33:37 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-04-30 22:33:37 +0000 |
commit | c173ac862828a54925737fc1d90ede1dd09a312c (patch) | |
tree | 63d6b46455a4abdaf96aef59bbaa4406c6fe04f8 /extra/slim/rc.d | |
parent | 693b5793b8c615601135bc04216a2ca0966087c5 (diff) |
Sat Apr 30 22:33:37 UTC 2011
Diffstat (limited to 'extra/slim/rc.d')
-rwxr-xr-x | extra/slim/rc.d | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/extra/slim/rc.d b/extra/slim/rc.d new file mode 100755 index 000000000..b0be7ffc5 --- /dev/null +++ b/extra/slim/rc.d @@ -0,0 +1,36 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/slim` +case "$1" in + start) + stat_busy "Starting Simple Login Manager" + [ -z "$PID" ] && /usr/bin/slim -d &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon slim + stat_done + fi + ;; + stop) + stat_busy "Stopping Simple Login Manager" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon slim + stat_done + fi + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |