Permalink
Browse files

Update init.d

  • Loading branch information...
1 parent d62691b commit 40f6557be98506c70f86599b91050c85f9d1037c @hsleisink committed Apr 7, 2013
Showing with 13 additions and 9 deletions.
  1. +13 −9 extra/debian/init.d
View
22 extra/debian/init.d
@@ -14,25 +14,29 @@
# Defaults
-if [ -r /etc/firetable/firetable.conf ]; then
+if [ -r /etc/firetable/firetable.conf ]; then
INTERFACES=`grep "^enable_on_boot" /etc/firetable/firetable.conf | cut -f2 -d"=" | sed "s/^ *//"`
fi
-function firetable
+function firetable {
+ if [ "${INTERFACES}" = "all" ]; then
+ /usr/sbin/firetable $1
+ elif [ "${INTERFACES}" != "" ]; then
+ /usr/sbin/firetable $1 ${INTERFACES}
+ fi
+}
case "$1" in
start|stop)
- if [ "${INTERFACES}" = "all" ]; then
- /usr/sbin/firetable $1
- elif [ "${INTERFACES}" != "" ]; then
- /usr/sbin/firetable $1 ${INTERFACES}
- fi
+ firetable $1
;;
restart|force-reload)
+ firetable stop
+ firetable start
;;
*)
- echo "Usage: /etc/init.d/firetable {start|stop}"
- exit 1
+ echo "Usage: /etc/init.d/firetable {start|stop|restart|force-reload}"
+ exit 1
esac
exit 0

0 comments on commit 40f6557

Please sign in to comment.