updated on Mon Jan 23 00:00:36 UTC 2012
[aur-mirror.git] / lxdm-svn / lxdm.rc
blob98247e6228c8894f84f674f0f9c717211bb9d909
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 # Allow cdd to override the config
7 if [ -f /etc/lxdm/lxdm.conf ]; then
8 CONFIG_FILE="--config=/etc/lxdm/lxdm.conf"
9 fi
11 PID=`pidof -o %PPID /usr/sbin/lxdm`
12 case "$1" in
13 start)
14 stat_busy "Starting LXDM Display Manager"
15 [ -z "$PID" ] && /usr/sbin/lxdm -d $CONFIG_FILE &> /dev/null
16 if [ $? -gt 0 ]; then
17 stat_fail
18 else
19 add_daemon lxdm
20 stat_done
23 stop)
24 stat_busy "Stopping LXDM Display Manager"
25 [ ! -z "$PID" ] && kill $PID &> /dev/null
26 if [ $? -gt 0 ]; then
27 stat_fail
28 else
29 rm_daemon lxdm
30 stat_done
33 restart)
34 $0 stop
35 sleep 3
36 $0 start
39 echo "usage: $0 {start|stop|restart}"
40 esac
41 exit 0