wok-next diff postfix/stuff/etc/init.d/postfix @ rev 21722
efivar: typo in post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 01 10:31:46 2020 +0000 (2020-09-01) |
parents | 9b235e7c8d32 |
children |
line diff
1.1 --- a/postfix/stuff/etc/init.d/postfix Tue Sep 01 12:28:10 2009 +0200 1.2 +++ b/postfix/stuff/etc/init.d/postfix Tue Sep 01 10:31:46 2020 +0000 1.3 @@ -9,7 +9,7 @@ 1.4 . /etc/daemons.conf 1.5 1.6 NAME=Postfix 1.7 -DESC="SMTP server" 1.8 +DESC="$(_ '%s server' SMTP)" 1.9 DAEMON=/usr/lib/postfix/master 1.10 OPTIONS=$POSTFIX_OPTIONS 1.11 PIDFILE=/var/spool/postfix/pid/master.pid 1.12 @@ -17,47 +17,46 @@ 1.13 case "$1" in 1.14 start) 1.15 if active_pidfile $PIDFILE master ; then 1.16 - echo "$NAME already running." 1.17 + _ '%s is already running.' $NAME 1.18 exit 1 1.19 fi 1.20 - echo -n "Starting $DESC: $NAME... " 1.21 + action 'Starting %s: %s...' "$DESC" $NAME 1.22 $DAEMON $OPTIONS & 1.23 status 1.24 ;; 1.25 stop) 1.26 if ! active_pidfile $PIDFILE master ; then 1.27 - echo "$NAME is not running." 1.28 + _ '%s is not running.' $NAME 1.29 exit 1 1.30 fi 1.31 - echo -n "Stopping $DESC: $NAME... " 1.32 - kill `cat $PIDFILE` && rm -f $PIDFILE 1.33 + action 'Stopping %s: %s...' "$DESC" $NAME 1.34 + kill $(cat $PIDFILE) && rm -f $PIDFILE 1.35 status 1.36 ;; 1.37 restart) 1.38 if ! active_pidfile $PIDFILE master ; then 1.39 - echo "$NAME is not running." 1.40 + _ '%s is not running.' $NAME 1.41 exit 1 1.42 fi 1.43 - echo -n "Restarting $DESC: $NAME... " 1.44 - kill `cat $PIDFILE` && rm -f $PIDFILE 1.45 + action 'Restarting %s: %s...' "$DESC" $NAME 1.46 + kill $(cat $PIDFILE) && rm -f $PIDFILE 1.47 sleep 2 1.48 $DAEMON $OPTIONS & 1.49 status 1.50 ;; 1.51 reload) 1.52 if ! active_pidfile $PIDFILE master ; then 1.53 - echo "$NAME is not running." 1.54 + _ '%s is not running.' $NAME 1.55 exit 1 1.56 fi 1.57 postsuper active || exit 1 1.58 - kill -HUP `cat $PIDFILE` 1.59 + kill -HUP $(cat $PIDFILE) 1.60 postsuper & 1.61 status 1.62 ;; 1.63 *) 1.64 - echo "" 1.65 - echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart|reload]" 1.66 - echo "" 1.67 + emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart|reload]" 1.68 + newline 1.69 exit 1 1.70 ;; 1.71 esac