summaryrefslogtreecommitdiff
path: root/sentinel-fwlogs/files/init
blob: 955b333fea909744332d2377530b58775b91d30c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
}