procd: do not overwrite service data by default

Allows a running servie to manage its own data if untouched by the init script

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2024-12-17 21:21:37 +01:00
parent 3d900bd055
commit 8c5826b140
2 changed files with 5 additions and 7 deletions

View File

@ -100,10 +100,6 @@ service_triggers() {
return 0
}
service_data() {
return 0
}
service_running() {
local instance="${1:-*}"

View File

@ -101,9 +101,11 @@ _procd_close_service() {
_procd_open_trigger
service_triggers
_procd_close_trigger
_procd_open_data
service_data
_procd_close_data
type service_data >/dev/null 2>&1 && {
_procd_open_data
service_data
_procd_close_data
}
_procd_ubus_call ${1:-set}
}