From 1f9e716ed0f972bd4ae8bfb19edbe6ded3deaea1 Mon Sep 17 00:00:00 2001 From: hoelee Date: Thu, 28 May 2026 12:17:00 +0800 Subject: [PATCH] feat(shell-sync): validate_settings() part 2/3 --- platform/shell-sync/sync.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/platform/shell-sync/sync.sh b/platform/shell-sync/sync.sh index dc35c5e4..b0689024 100644 --- a/platform/shell-sync/sync.sh +++ b/platform/shell-sync/sync.sh @@ -59,3 +59,16 @@ validate_settings() { return 1 fi + if [ -z "$SYNC_CRON" ] && ! [[ "$SYNC_INTERVAL" =~ ^[1-9][0-9]*$ ]]; then + log "Configuration error: SYNC_INTERVAL must be a positive number of seconds" + return 1 + fi + + case "$NOTIFY_MODE" in + none|batch_success|account_success|failure) ;; + *) + log "Configuration error: NOTIFY_MODE must be none, batch_success, account_success, or failure" + return 1 + ;; + esac +