feat(shell-sync): validate_settings() part 2/3

This commit is contained in:
hoelee committed 2026-05-28 12:17:00 +08:00
1 parent 87d52e0905
commit 1f9e716ed0
1 file changed
+13
+13
View File
@@ -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