wok view gpm/stuff/etc/init.d/gpm @ rev 19126

Fill "customization" category in.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon May 09 21:59:10 2016 +0300 (2016-05-09)
parents c9eb9aa2daa4
children 7f188676b59c
line source
1 #!/bin/sh
2 # /etc/init.d/gpm : Start, stop and restart gpm server on SliTaz, at
3 # boot time or with the command line.
4 #
5 # To start gpm server at boot time, just put mysql in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=gpm
12 DESC="gpm server"
13 DAEMON=/usr/sbin/gpm
14 OPTIONS=$GPM_OPTIONS
15 [ -n "$OPTIONS" ] || OPTIONS="-m /dev/psaux -t ps2"
17 case "$1" in
18 start)
19 if active_pidfile $PIDFILE gpm ; then
20 echo "$NAME already running."
21 exit 1
22 fi
23 $DAEMON $OPTIONS
24 status
25 ;;
26 stop)
27 if ! active_pidfile $PIDFILE gpm ; then
28 echo "$NAME is not running."
29 exit 1
30 fi
31 $DAEMON -k
32 status
33 ;;
34 restart)
35 if ! active_pidfile $PIDFILE gpm ; then
36 echo "$NAME is not running."
37 exit 1
38 fi
39 $DAEMON -k
40 status
41 $DAEMON $OPTIONS
42 status
43 ;;
44 *)
45 echo ""
46 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
47 echo ""
48 exit 1
49 ;;
50 esac
52 exit 0