summaryrefslogtreecommitdiff
path: root/network/geomyidae/rc.geomyidae.new
blob: 34c2c75317b33be51fd8430d5d3b6acd3a0a3ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

PID=$(pidof -o %PPID /usr/bin/geomyidae)

case "$1" in
    start)
        echo "Starting geomyidae"
        [ -z "$PID" ] && /usr/bin/geomyidae $GEOMYIDAE_ARGS 2>&1
        if [ $? -gt 0 ]; then
            echo "Startup failed"
        fi
        ;;
    stop)
        echo "Stopping geomyidae"
        [ -n "$PID" ] && kill $PID &>/dev/null
        if [ $? -gt 0 ]; then
            echo "Stopping failed"
        fi
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
esac
exit 0