Skip to content

Commit f0ef846

Browse files
committed
contrib: add startup script
1 parent 4de42d1 commit f0ef846

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

contrib/S93aa-proxy-rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
#
3+
# Start aa-proxy-rs daemon
4+
#
5+
# For documentation and command line parameters go to:
6+
# https://github.com/manio/aa-proxy-rs
7+
8+
DAEMON="aa-proxy-rs"
9+
PIDFILE="/var/run/$DAEMON.pid"
10+
AA_PROXY_RS_ARGS="-c -s60"
11+
12+
RETVAL=0
13+
14+
case "$1" in
15+
start)
16+
printf "Starting $DAEMON: "
17+
start-stop-daemon -S -b -q -m -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- $AA_PROXY_RS_ARGS
18+
RETVAL=$?
19+
[ $RETVAL = 0 ] && echo "OK" || echo "FAIL"
20+
;;
21+
stop)
22+
printf "Stopping $DAEMON: "
23+
start-stop-daemon -K -q -p "$PIDFILE"
24+
RETVAL=$?
25+
[ $RETVAL = 0 ] && echo "OK" || echo "FAIL"
26+
;;
27+
restart)
28+
$0 stop
29+
$0 start
30+
;;
31+
*)
32+
echo "Usage: $0 {start|stop}"
33+
;;
34+
esac
35+
36+
exit $RETVAL

0 commit comments

Comments
 (0)