wok-current diff smartmontools/stuff/etc/init.d/smartd @ rev 19468
gnumeric: sorry, update depends now.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Oct 25 02:07:03 2016 +0300 (2016-10-25) |
parents | 1b6281d68d9f |
children |
line diff
1.1 --- a/smartmontools/stuff/etc/init.d/smartd Fri Sep 10 16:25:17 2010 +0200 1.2 +++ b/smartmontools/stuff/etc/init.d/smartd Tue Oct 25 02:07:03 2016 +0300 1.3 @@ -1,5 +1,5 @@ 1.4 #!/bin/sh 1.5 -# /etc/init.d/smartd : Start, stop and restart Smartmontools (SMART) daemon on SliTaz, at 1.6 +# /etc/init.d/smartd : Start, stop and restart Smartmontools (SMART) daemon on SliTaz, at 1.7 # boot time or with the command line. 1.8 # 1.9 # To start SMART monitoring at boot time, just put smartd in the $RUN_DAEMONS 1.10 @@ -9,7 +9,7 @@ 1.11 . /etc/daemons.conf 1.12 1.13 NAME=smartd 1.14 -DESC="Smartmontools (SMART) Daemon" 1.15 +DESC="$(_ 'Smartmontools (SMART) Daemon')" 1.16 DAEMON=/usr/sbin/smartd 1.17 1.18 PIDFILE=/var/run/smartd.pid 1.19 @@ -18,37 +18,36 @@ 1.20 case "$1" in 1.21 start) 1.22 if active_pidfile $PIDFILE smartd ; 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 smartd ; 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 smartd ; 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