aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Gustavo Zacarias <gustavo@zacarias.com.ar>2014-12-15 19:56:27 -0300
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-12-16 00:45:44 +0100
commitd98be88165d5d8d428d102552b1f70e76ecbdab7 (patch)
tree0665322445f5dee04bdde47a3e9a7213d691a8bb /package
parent48a9e431d8815f988ffc558894b2374e028c096f (diff)
downloadbuildroot-d98be88165d5d8d428d102552b1f70e76ecbdab7.tar.gz
buildroot-d98be88165d5d8d428d102552b1f70e76ecbdab7.tar.bz2
stunnel: adjust initscript
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>
Diffstat (limited to 'package')
-rw-r--r--package/stunnel/S50stunnel37
1 files changed, 18 insertions, 19 deletions
diff --git a/package/stunnel/S50stunnel b/package/stunnel/S50stunnel
index 95bb301871..5827fe0f8c 100644
--- a/package/stunnel/S50stunnel
+++ b/package/stunnel/S50stunnel
@@ -1,36 +1,35 @@
#!/bin/sh
-#
-# Starts stunnel
-#
start() {
- echo -n "Starting stunnel: "
- start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel
- echo "OK"
+ 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
- echo "OK"
+ echo -n "Stopping stunnel: "
+ start-stop-daemon -K -q -p /var/run/stunnel.pid
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
}
+
restart() {
- stop
- start
+ stop
+ start
}
case "$1" in
start)
- start
- ;;
+ start
+ ;;
stop)
- stop
- ;;
+ stop
+ ;;
restart|reload)
- restart
- ;;
+ restart
+ ;;
*)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
esac
exit $?