Added prebuild to vi PKGBUILD
[Archlinux-Stable.git] / support / gpm / gpm
blob4acc908d3c7949362c263f033320cc93c8fa0afe
1 #!/bin/bash
3 # source application-specific settings
4 GPM_ARGS=
5 [ -f /etc/conf.d/gpm ] && . /etc/conf.d/gpm
7 . /etc/rc.conf
8 . /etc/rc.d/functions
10 PID=`pidof -o %PPID /usr/sbin/gpm`
11 case "$1" in
12 start)
13 stat_busy "Starting GPM Daemon"
14 [ -z "$PID" ] && /usr/sbin/gpm ${GPM_ARGS}
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon gpm
19 stat_done
22 stop)
23 stat_busy "Stopping GPM Daemon"
24 [ ! -z "$PID" ] && kill $PID &> /dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon gpm
29 stat_done
32 restart)
33 $0 stop
34 sleep 1
35 $0 start
38 echo "usage: $0 {start|stop|restart}"
39 esac
40 exit 0