wok annotate fcron/stuff/fcron @ rev 21650

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