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

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (2022-05-21)
parents 7f188676b59c
children
line source
1 #!/bin/sh
2 # /etc/init.d/lxdm: Start, stop and restart LXDM daemon 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 _ '%s is already running.' $NAME
19 exit 1
20 fi
21 action 'Starting %s: %s...' "$DESC" $NAME
22 $DAEMON $OPTION
23 status ;;
24 stop)
25 if ! active_pidfile $PIDFILE lxdm ; then
26 _ '%s is not running.' $NAME
27 exit 1
28 fi
29 action 'Stopping %s: %s...' "$DESC" $NAME
30 killall lxdm
31 rm $PIDFILE
32 status ;;
33 restart)
34 if ! active_pidfile $PIDFILE lxdm ; then
35 _ '%s is not running.'
36 exit 1
37 fi
38 action 'Restarting %s: %s...' "$DESC" $NAME
39 killall lxdm
40 rm $PIDFILE
41 sleep 2
42 $DAEMON $OPTION
43 status ;;
44 *)
45 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
46 newline
47 exit 1 ;;
48 esac
50 exit 0