wok annotate gpm/stuff/etc/init.d/gpm @ rev 22760
updated findutils (4.6.0 -> 4.7.0)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jan 24 17:10:12 2020 +0100 (2020-01-24) |
parents | 8ebec64e4191 |
children |
rev | line source |
---|---|
pascal@2193 | 1 #!/bin/sh |
al@19159 | 2 # /etc/init.d/gpm : Start, stop and restart gpm server on SliTaz, at |
pascal@2193 | 3 # boot time or with the command line. |
pascal@2193 | 4 # |
pascal@2193 | 5 # To start gpm server at boot time, just put mysql in the $RUN_DAEMONS |
pascal@2193 | 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf |
pascal@2193 | 7 # |
pascal@2193 | 8 . /etc/init.d/rc.functions |
pascal@2193 | 9 . /etc/daemons.conf |
pascal@2193 | 10 |
pascal@2193 | 11 NAME=gpm |
al@19159 | 12 DESC="$(_ '%s server' GPM)" |
pascal@2193 | 13 DAEMON=/usr/sbin/gpm |
pascal@2193 | 14 OPTIONS=$GPM_OPTIONS |
pascal@2193 | 15 [ -n "$OPTIONS" ] || OPTIONS="-m /dev/psaux -t ps2" |
pascal@2193 | 16 |
pascal@2193 | 17 case "$1" in |
pascal@2193 | 18 start) |
pascal@15577 | 19 if active_pidfile $PIDFILE gpm ; then |
al@19159 | 20 _ '%s is already running.' $NAME |
pascal@15577 | 21 exit 1 |
pascal@15577 | 22 fi |
al@19159 | 23 action 'Starting %s: %s...' "$DESC" $NAME |
pascal@2193 | 24 $DAEMON $OPTIONS |
pascal@2193 | 25 status |
pascal@2193 | 26 ;; |
pascal@2193 | 27 stop) |
pascal@15577 | 28 if ! active_pidfile $PIDFILE gpm ; then |
al@19159 | 29 _ '%s is not running.' $NAME |
pascal@15577 | 30 exit 1 |
pascal@15577 | 31 fi |
al@19159 | 32 action 'Stopping %s: %s...' "$DESC" $NAME |
pascal@2193 | 33 $DAEMON -k |
pascal@2193 | 34 status |
pascal@2193 | 35 ;; |
pascal@2193 | 36 restart) |
pascal@15577 | 37 if ! active_pidfile $PIDFILE gpm ; then |
al@19159 | 38 _ '%s is not running.' $NAME |
pascal@15577 | 39 exit 1 |
pascal@15577 | 40 fi |
al@19159 | 41 action 'Restarting %s: %s...' "$DESC" $NAME |
pascal@2193 | 42 $DAEMON -k |
pascal@2193 | 43 status |
pascal@2193 | 44 $DAEMON $OPTIONS |
pascal@2193 | 45 status |
pascal@2193 | 46 ;; |
pascal@2193 | 47 *) |
al@19159 | 48 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" |
al@19159 | 49 newline |
pascal@2193 | 50 exit 1 |
pascal@2193 | 51 ;; |
pascal@2193 | 52 esac |
pascal@2193 | 53 |
pascal@2193 | 54 exit 0 |