wok annotate collectd/stuff/collectd @ rev 23436

updated plymouth again (0.8.6.1 -> 0.9.4)
author Hans-G?nter Theisgen
date Thu Apr 02 08:09:39 2020 +0100 (2020-04-02)
parents 55d75f0e3533
children
rev   line source
pascal@11218 1 #!/bin/sh
al@19159 2 # /etc/init.d/collectd : Start, stop and restart Collectd server on SliTaz, at
pascal@11218 3 # boot time or with the command line.
pascal@11218 4 #
pascal@11218 5 # To start Collectd server at boot time, just put collectd in the $RUN_DAEMONS
pascal@11218 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
pascal@11218 7 #
pascal@11218 8 . /etc/init.d/rc.functions
pascal@11218 9 . /etc/daemons.conf
pascal@11218 10
pascal@11218 11 NAME=collectd
al@19159 12 DESC="$(_ 'Statistics collection daemon')"
pascal@11218 13 DAEMON=/usr/sbin/collectd
pascal@11218 14 OPTIONS=""
pascal@11218 15 PIDFILE=/var/run/collectd.pid
pascal@11218 16
pascal@11218 17 case "$1" in
pascal@11218 18 start)
pascal@11218 19 if active_pidfile $PIDFILE collectd ; then
al@19159 20 _ '%s is already running.' $NAME
pascal@11218 21 exit 1
pascal@11218 22 fi
al@19159 23 action 'Starting %s: %s...' "$DESC" $NAME
pascal@11218 24 $DAEMON $OPTIONS
pascal@11218 25 status
pascal@11218 26 ;;
pascal@11218 27 stop)
pascal@11218 28 if ! active_pidfile $PIDFILE collectd ; then
al@19159 29 _ '%s is not running.' $NAME
pascal@11218 30 exit 1
pascal@11218 31 fi
al@19159 32 action 'Stopping %s: %s...' "$DESC" $NAME
al@19159 33 kill $(cat $PIDFILE)
pascal@11218 34 status
pascal@11218 35 ;;
pascal@11218 36 restart)
pascal@11218 37 if ! active_pidfile $PIDFILE collectd ; then
al@19159 38 _ '%s is not running.' $NAME
pascal@11218 39 exit 1
pascal@11218 40 fi
al@19159 41 action 'Restarting %s: %s...' "$DESC" $NAME
al@19159 42 kill $(cat $PIDFILE)
pascal@11218 43 sleep 2
pascal@11218 44 $DAEMON $OPTIONS
pascal@11218 45 status
pascal@11218 46 ;;
pascal@11218 47 *)
al@19159 48 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
al@19159 49 newline
pascal@11218 50 exit 1
pascal@11218 51 ;;
pascal@11218 52 esac
pascal@11218 53
pascal@11218 54 exit 0