bpfcountd_start() {
local cfg="$1"
- local namespace="$2"
local disabled
local ifname
return 0
}
- [ -z "$namespace" ] && namespace="bpfcountd"
-
- procd_open_instance "$namespace.$cfg"
+ procd_open_instance "$cfg"
procd_set_param command /usr/sbin/bpfcountd
procd_append_param command -i "$ifname"
procd_append_param command -f "$filterfile"
- procd_append_param command -u $UNIXSOCKDIR/"$namespace.$cfg".sock
+ procd_append_param command -u $UNIXSOCKDIR/"$cfg".sock
[ -n "$prefilter" ] && procd_append_param command -F "$prefilter"
[ -n "$buffersize" ] && procd_append_param command -b "$buffersize"
start_service() {
local cfg="$1"
- local namespace="$2"
local instance_found=0
. /lib/functions/network.sh
if [ -n "$cfg" ]; then
[ "$instance_found" -gt 0 ] || return
- bpfcountd_start "$cfg" "$namespace"
+ bpfcountd_start "$cfg"
else
- config_foreach bpfcountd_start bpfcountd "$namespace"
+ config_foreach bpfcountd_start bpfcountd
fi
}
stop_service() {
local cfg="$1"
- local namespace="$2"
-
- [ -z "$namespace" ] && namespace="bpfcountd"
if [ -n "$cfg" ]; then
- rm $UNIXSOCKDIR/$namespace.$cfg.sock
+ rm $UNIXSOCKDIR/$cfg.sock
else
- rm $UNIXSOCKDIR/$namespace.*.sock
+ rm $UNIXSOCKDIR/*.sock
fi
}