summaryrefslogtreecommitdiffstats
path: root/extra/lxdm/lxdm-deamon
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2011-02-07 23:03:08 +0100
committertnut <thierryn1 at hispeed dot ch>2011-02-07 23:03:08 +0100
commitfe520693077620b9786e7051e5eb4c14ab2d1794 (patch)
tree1362fea3f9846a71f9c6d7021cd62ee511adcd34 /extra/lxdm/lxdm-deamon
parent93c70848be6314339ace9f8ce920994633f20d41 (diff)
parent53966c91428d9b7b86b74e7fbf213c0a3533f135 (diff)
downloadnutyx-pakxe-fe520693077620b9786e7051e5eb4c14ab2d1794.tar.gz
nutyx-pakxe-fe520693077620b9786e7051e5eb4c14ab2d1794.tar.bz2
nutyx-pakxe-fe520693077620b9786e7051e5eb4c14ab2d1794.tar.xz
nutyx-pakxe-fe520693077620b9786e7051e5eb4c14ab2d1794.zip
Merge branch 'master' of ssh://kiao.no-ip.info:443/~/pakxe
Diffstat (limited to 'extra/lxdm/lxdm-deamon')
-rw-r--r--extra/lxdm/lxdm-deamon36
1 files changed, 36 insertions, 0 deletions
diff --git a/extra/lxdm/lxdm-deamon b/extra/lxdm/lxdm-deamon
new file mode 100644
index 000000000..68eb6225d
--- /dev/null
+++ b/extra/lxdm/lxdm-deamon
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=$(pidof -o %PPID `which lxdm-binary`)
+case "$1" in
+ start)
+ stat_busy "Starting LXDM Display Manager"
+ [ -z "$PID" ] && /usr/sbin/lxdm -d &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon lxdm
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping LXDM Display Manager"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon lxdm
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0