Archlinux.rc.d - geomyidae - A small C-based gopherd. | |
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
Archlinux.rc.d (584B) | |
--- | |
1 #!/bin/bash | |
2 | |
3 . /etc/rc.conf | |
4 . /etc/rc.d/functions | |
5 . /etc/conf.d/geomyidae | |
6 | |
7 PID=$(pidof -o %PPID /usr/bin/geomyidae) | |
8 case "$1" in | |
9 start) | |
10 stat_busy "Starting geomyidae" | |
11 [ -z "$PID" ] && /usr/bin/geomyidae $GEOMYIDAE_ARGS 2>&1 | |
12 if [ $? -gt 0 ]; then | |
13 stat_fail | |
14 else | |
15 add_daemon geomyidae | |
16 stat_done | |
17 fi | |
18 ;; | |
19 stop) | |
20 stat_busy "Stopping geomyidae" | |
21 [ -n "$PID" ] && kill $PID &>/dev/null | |
22 if [ $? -gt 0 ]; then | |
23 stat_fail | |
24 else | |
25 rm_daemon geomyidae | |
26 stat_done | |
27 fi | |
28 ;; | |
29 restart) | |
30 $0 stop | |
31 $0 start | |
32 ;; | |
33 *) | |
34 echo "usage: $0 {start|stop|restart}" | |
35 esac | |
36 exit 0 | |
37 |