aboutsummaryrefslogtreecommitdiff
path: root/src/ferm/ferm.rc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ferm/ferm.rc')
-rwxr-xr-xsrc/ferm/ferm.rc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ferm/ferm.rc b/src/ferm/ferm.rc
new file mode 100755
index 0000000..0325c4d
--- /dev/null
+++ b/src/ferm/ferm.rc
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/${0##*/}
+
+case "$1" in
+ start)
+ status 'Loading FERM rules' ferm "$CONFIG_FILE" &&
+ add_daemon ${0##*/} || exit 1
+ ;;
+ stop)
+ status 'Clearing FERM rules' ferm -F "$CONFIG_FILE" &&
+ rm_daemon ${0##*/} || exit 1
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart}" >&2
+ exit 1
+ ;;
+esac
+
+# vim:set ts=2 sw=2 ft=sh et: