wok diff fcron/stuff/fcron @ rev 23861
xvkbd: fix fetch,compile,and genpkg
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Fri Jun 19 01:26:32 2020 -0400 (2020-06-19) |
parents | aefe609dbcdf |
children | 0db0ae7e04c2 |
line diff
1.1 --- a/fcron/stuff/fcron Wed Sep 23 14:06:30 2009 +0000 1.2 +++ b/fcron/stuff/fcron Fri Jun 19 01:26:32 2020 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 #!/bin/sh 1.5 -# /etc/init.d/fcron : Start, stop and fcron on SliTaz, at 1.6 +# /etc/init.d/fcron : Start, stop and fcron on SliTaz, at 1.7 # boot time or with the command line. 1.8 # 1.9 # To start SSH server at boot time, just put fcron in the $RUN_DAEMONS 1.10 @@ -9,7 +9,7 @@ 1.11 . /etc/daemons.conf 1.12 1.13 NAME=fcron 1.14 -DESC="Cron daemon" 1.15 +DESC="$(_ '%s daemon' Cron)" 1.16 DAEMON=/usr/bin/fcron 1.17 OPTIONS=-b 1.18 PIDFILE=/var/run/fcron.pid 1.19 @@ -17,37 +17,36 @@ 1.20 case "$1" in 1.21 start) 1.22 if active_pidfile $PIDFILE fcron ; then 1.23 - echo "$NAME already running." 1.24 + _ '%s is already running.' $NAME 1.25 exit 1 1.26 fi 1.27 - echo -n "Starting $DESC: $NAME... " 1.28 + action 'Starting %s: %s...' "$DESC" $NAME 1.29 $DAEMON $OPTIONS 1.30 status 1.31 ;; 1.32 stop) 1.33 if ! active_pidfile $PIDFILE fcron ; then 1.34 - echo "$NAME is not running." 1.35 + _ '%s is not running.' $NAME 1.36 exit 1 1.37 fi 1.38 - echo -n "Stopping $DESC: $NAME... " 1.39 - kill `cat $PIDFILE` 1.40 + action 'Stopping %s: %s...' "$DESC" $NAME 1.41 + kill $(cat $PIDFILE) 1.42 status 1.43 ;; 1.44 restart) 1.45 if ! active_pidfile $PIDFILE fcron ; then 1.46 - echo "$NAME is not running." 1.47 + _ '%s is not running.' $NAME 1.48 exit 1 1.49 fi 1.50 - echo -n "Restarting $DESC: $NAME... " 1.51 - kill `cat $PIDFILE` 1.52 + action 'Restarting %s: %s...' "$DESC" $NAME 1.53 + kill $(cat $PIDFILE) 1.54 sleep 2 1.55 $DAEMON $OPTIONS 1.56 status 1.57 ;; 1.58 *) 1.59 - echo "" 1.60 - echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 1.61 - echo "" 1.62 + emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 1.63 + newline 1.64 exit 1 1.65 ;; 1.66 esac