summaryrefslogtreecommitdiff
path: root/sentinel-fwlogs/files/init
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-09-26 11:21:29 +0200
committerKarel Kočí <cynerd@email.cz>2020-09-26 11:21:29 +0200
commitca796b169e12d420a27ce18d75a80d689c6f3822 (patch)
tree24a227cfff5fd08cd8373a2e95acba61e7e7f5f5 /sentinel-fwlogs/files/init
parent5fee4bd515d55cb1ded1bed0c34fb89c22e01a87 (diff)
downloadopenwrt-personal-pkgs-ca796b169e12d420a27ce18d75a80d689c6f3822.tar.gz
openwrt-personal-pkgs-ca796b169e12d420a27ce18d75a80d689c6f3822.tar.bz2
openwrt-personal-pkgs-ca796b169e12d420a27ce18d75a80d689c6f3822.zip
Add packages for testing
Diffstat (limited to 'sentinel-fwlogs/files/init')
-rwxr-xr-xsentinel-fwlogs/files/init25
1 files changed, 25 insertions, 0 deletions
diff --git a/sentinel-fwlogs/files/init b/sentinel-fwlogs/files/init
new file mode 100755
index 0000000..955b333
--- /dev/null
+++ b/sentinel-fwlogs/files/init
@@ -0,0 +1,25 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+START=99
+STOP=10
+
+
+start_service() {
+ source /lib/functions/sentinel.sh
+ source /usr/libexec/sentinel/fwlogs-defaults.sh
+ allowed_to_run "fwlogs" || return 1
+
+ config_load sentinel
+ local nflog_group nflog_threshold
+ config_get nflog_group fwlogs nflog_group "$DEFAULT_NFLOG_GROUP"
+
+ procd_open_instance
+ procd_set_param command /usr/bin/sentinel-fwlogs
+ procd_append_param command --nflog-group="$nflog_group"
+ procd_set_param respawn 3600 5 5
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param file /etc/config/sentinel
+ procd_close_instance
+}