wok annotate gpm/stuff/etc/init.d/gpm @ rev 19145

mpv: add EXTRA_SOURCE_FILES
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 19 16:16:54 2016 +0200 (2016-05-19)
parents c9eb9aa2daa4
children 7f188676b59c
rev   line source
pascal@2193 1 #!/bin/sh
pascal@2193 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
pascal@2193 12 DESC="gpm server"
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
pascal@15577 20 echo "$NAME already running."
pascal@15577 21 exit 1
pascal@15577 22 fi
pascal@2193 23 $DAEMON $OPTIONS
pascal@2193 24 status
pascal@2193 25 ;;
pascal@2193 26 stop)
pascal@15577 27 if ! active_pidfile $PIDFILE gpm ; then
pascal@15577 28 echo "$NAME is not running."
pascal@15577 29 exit 1
pascal@15577 30 fi
pascal@2193 31 $DAEMON -k
pascal@2193 32 status
pascal@2193 33 ;;
pascal@2193 34 restart)
pascal@15577 35 if ! active_pidfile $PIDFILE gpm ; then
pascal@15577 36 echo "$NAME is not running."
pascal@15577 37 exit 1
pascal@15577 38 fi
pascal@2193 39 $DAEMON -k
pascal@2193 40 status
pascal@2193 41 $DAEMON $OPTIONS
pascal@2193 42 status
pascal@2193 43 ;;
pascal@2193 44 *)
pascal@2193 45 echo ""
pascal@2193 46 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
pascal@2193 47 echo ""
pascal@2193 48 exit 1
pascal@2193 49 ;;
pascal@2193 50 esac
pascal@2193 51
pascal@2193 52 exit 0