wok view dhid/stuff/init.d/dhid @ rev 22042

gcc83-lib-base: do NOT provide gcc-lib-base
Currently BOTH gcc-lib-base and gcc83-lib-base are installed on my SliTaz system. So, with the current (and longstanding) tazpkg limitations I can't update just gcc-lib-base: tazpkg always updates gcc83-lib-base for me instead. Now I can't run Firefox, Vivaldi, Chrome, etc. I think because of gcc-lib-base, but I not sure 1bsolutely.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 22 12:55:54 2019 +0300 (2019-10-22)
parents 429355d87af5
children
line source
1 #!/bin/sh
2 #
3 # /etc/init.d/dhid: Start, stop and restart dhis daemon on SliTaz
4 #
5 . /etc/init.d/rc.functions
6 #. /etc/daemons.conf
8 NAME=DHID
9 DESC="$(_ 'DHIS client daemon')"
10 DAEMON=/usr/sbin/dhid
11 PIDFILE=/run/dhid.pid
12 OPTIONS="-P $PIDFILE"
14 case "$1" in
15 start)
16 if active_pidfile $PIDFILE dhid; then
17 _ '%s is already running.' $NAME
18 exit 1
19 fi
20 action 'Starting %s: %s...' "$DESC" $NAME
21 $DAEMON $OPTIONS
22 status
23 ;;
24 stop)
25 if ! active_pidfile $PIDFILE dhid; then
26 _ '%s is not running.' $NAME
27 exit 1
28 fi
29 action 'Stopping %s: %s...' "$DESC" $NAME
30 kill $(cat $PIDFILE)
31 rm $PIDFILE
32 status
33 ;;
34 restart)
35 if ! active_pidfile $PIDFILE dhid; then
36 _ '%s is not running.' $NAME
37 exit 1
38 fi
39 action 'Restarting %s: %s...' "$DESC" $NAME
40 kill $(cat $PIDFILE)
41 rm $PIDFILE
42 sleep 2
43 $DAEMON $OPTIONS
44 status
45 ;;
46 *)
47 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
48 newline
49 exit 1
50 ;;
51 esac
53 exit 0