debian: Provide an init script to run the daemon on boot.
[fwd] / debian / fw.postinst
diff --git a/debian/fw.postinst b/debian/fw.postinst
new file mode 100644 (file)
index 0000000..41ae0c3
--- /dev/null
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+set -e
+getent group fw >/dev/null || addgroup --system fw
+getent passwd fw >/dev/null || {
+  adduser --system --ingroup fw --home / fw
+  usermod -c "Port forwarding daemon" -s /bin/false -g fw -G fw fw
+}
+
+#DEBHELPER#