Commit 40f6557b authored by Hugo Leisink's avatar Hugo Leisink 🎸
Browse files

Update init.d

parent d62691b7
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment