feat(shell-sync): run_cron_scheduler() part 2/3
This commit is contained in:
1 parent
b4023d69a3
commit
d399abb1b5
1 file changed
+10
@@ -340,3 +340,13 @@ run_cron_scheduler() {
|
||||
local wrapper="${PID_DIR}/cron-sync-all.sh"
|
||||
local crontab_file="${PID_DIR}/sync.crontab"
|
||||
|
||||
# Cron starts commands with a minimal environment. Preserve this container's
|
||||
# configuration in a root-only Bash wrapper so arbitrary ACCOUNT_N_* values work.
|
||||
{
|
||||
printf '#!/bin/bash\n'
|
||||
export -p
|
||||
printf 'exec /sync.sh sync-all\n'
|
||||
} > "$wrapper"
|
||||
chmod 700 "$wrapper"
|
||||
printf '%s %s >> /proc/1/fd/1 2>&1\n' "$SYNC_CRON" "$wrapper" > "$crontab_file"
|
||||
|
||||
Reference in new issue
Block a user