wok view lxdm/stuff/init.d/lxdm @ rev 12639

connman: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 29 21:53:45 2012 +0200 (2012-04-29)
parents
children 7f188676b59c
line source
1 #!/bin/sh
2 # /etc/init.d/lxdm: Start, stop and restart LXDM deamon on SliTaz, at boot
3 # time or with the command line.
4 #
5 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/lxdm/lxdm.conf
7 #
8 . /etc/init.d/rc.functions
10 NAME=LXDM
11 DESC="LXDE login manager"
12 DAEMON=/usr/sbin/lxdm
13 PIDFILE=/var/run/lxdm.pid
15 case "$1" in
16 start)
17 if active_pidfile $PIDFILE lxdm ; then
18 echo "$NAME already running."
19 exit 1
20 fi
21 echo -n "Starting $DESC: $NAME... "
22 $DAEMON $OPTION
23 status ;;
24 stop)
25 if ! active_pidfile $PIDFILE lxdm ; then
26 echo "$NAME is not running."
27 exit 1
28 fi
29 echo -n "Stopping $DESC: $NAME... "
30 killall lxdm
31 rm $PIDFILE
32 status ;;
33 restart)
34 if ! active_pidfile $PIDFILE lxdm ; then
35 echo "$NAME is not running."
36 exit 1
37 fi
38 echo -n "Restarting $DESC: $NAME... "
39 killall lxdm
40 rm $PIDFILE
41 sleep 2
42 $DAEMON $OPTION
43 status ;;
44 *)
45 echo ""
46 echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]"
47 echo "" && exit 1 ;;
48 esac
50 exit 0