🎨 Sync 2026-09-09 00:58:08

This commit is contained in:
github-actions[bot] committed 2026-09-09 00:58:08 +08:00
1 parent f4103e8c2a
commit b0cf524450
8 files changed
+43 -27

No files matched your search

+18 -14
View File
@@ -912,6 +912,7 @@ service_triggers() {
start_service() {
local init_cfg=
local enabled=1
local stdout=1
local stderr=1
local respawn=1
@@ -919,14 +920,27 @@ start_service() {
local run_group=
local old_umask
mkdir -p /var/etc
_TOML_ERR=0
_ALLOW_UNSAFE_TOKEN_SOURCE_EXEC=0
config_load "$NAME"
config_foreach _find_init_section init
if [ -n "$init_cfg" ]; then
config_list_foreach "$init_cfg" conf_inc _append_conf_file
config_get_bool enabled "$init_cfg" enabled 1
config_get_bool stdout "$init_cfg" stdout 1
config_get_bool stderr "$init_cfg" stderr 1
config_get_bool respawn "$init_cfg" respawn 1
config_get run_user "$init_cfg" user
config_get run_group "$init_cfg" group
fi
[ "$enabled" -eq 0 ] && return 1
mkdir -p /var/etc
_TOML_ERR=0
_ALLOW_UNSAFE_TOKEN_SOURCE_EXEC=0
old_umask="$(umask)"
umask 077
: > "$CONF_FILE" || {
@@ -948,16 +962,6 @@ start_service() {
} >> "$CONF_FILE" || return 1
[ "$_TOML_ERR" = "0" ] || return 1
if [ -n "$init_cfg" ]; then
config_list_foreach "$init_cfg" conf_inc _append_conf_file
config_get_bool stdout "$init_cfg" stdout 1
config_get_bool stderr "$init_cfg" stderr 1
config_get_bool respawn "$init_cfg" respawn 1
config_get run_user "$init_cfg" user
config_get run_group "$init_cfg" group
fi
{
config_foreach _emit_conf_section conf
} >> "$CONF_FILE" || return 1