Add quiet hours, health checks, and logging
This commit is contained in:
@@ -438,6 +438,9 @@ async def upgrade_confirm(cb: CallbackQuery):
|
||||
await cb.answer()
|
||||
|
||||
async def job():
|
||||
if cfg.get("safety", {}).get("dry_run", False):
|
||||
await cb.message.answer("🧪 Dry-run: upgrade skipped", reply_markup=system_ops_kb)
|
||||
return
|
||||
text = await apply_updates()
|
||||
await cb.message.answer(text, reply_markup=system_ops_kb, parse_mode="Markdown")
|
||||
|
||||
@@ -506,6 +509,9 @@ async def reboot_password(msg: Message):
|
||||
return
|
||||
|
||||
async def job():
|
||||
if cfg.get("safety", {}).get("dry_run", False):
|
||||
await msg.answer("🧪 Dry-run: reboot skipped", reply_markup=system_ops_kb)
|
||||
return
|
||||
await msg.answer("🔄 Rebooting…", reply_markup=system_ops_kb)
|
||||
await run_cmd(["sudo", "reboot"], timeout=10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user