From 88eaf203630d9b66819e26fea7a3f4a1df39a9c2 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 8 Jul 2026 15:18:36 +0200 Subject: [PATCH] pi_wake_agent.py: Add --dry-run flag - --dry-run shows what would be done without executing - Logs intended actions to log file - Exits 0 without modifying crontab or sending wake messages --- pi_wake_agent.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pi_wake_agent.py b/pi_wake_agent.py index 5acedc3c..7d5b3d00 100644 --- a/pi_wake_agent.py +++ b/pi_wake_agent.py @@ -382,6 +382,7 @@ EXAMPLES: parser.add_argument("--sessions", help="Comma-separated list of sessions") parser.add_argument("--msg", default=f"Operator says CONTINUE. {AGENT_NICK} here, saying hi!", help="Wake message") parser.add_argument("--debug", action="store_true", help="Enable debug logging") + parser.add_argument("--dry-run", action="store_true", help="Show what would be done without executing") parser.set_defaults(mode="install") return parser @@ -417,6 +418,12 @@ def main() -> int: logger.info(f"Message: {args.msg}") if args.mode == "succession": logger.info(f"Count: {args.count}") + if args.dry_run: + logger.info("DRY RUN: no actions will be executed") + + if args.dry_run: + logger.info("DRY RUN: would execute mode '%s' with sessions=%s, interval=%s, message='%s'", args.mode, sessions, args.interval, args.msg) + return 0 try: if args.mode == "install":