![Gustavo Zacarias](/assets/img/avatar_default.png)
Use proper status messages, make spacing standard instead of a mix of spacing/tabbing, drop boringly obvious comment from the header. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
36 lines
506 B
Bash
36 lines
506 B
Bash
#!/bin/sh
|
|
|
|
start() {
|
|
echo -n "Starting stunnel: "
|
|
start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
}
|
|
|
|
stop() {
|
|
echo -n "Stopping stunnel: "
|
|
start-stop-daemon -K -q -p /var/run/stunnel.pid
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
}
|
|
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
restart
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|