From e9d2b2222afe40023b25223d74ee0a9e3baee4e8 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Thu, 6 Mar 2025 08:45:03 -0600 Subject: [PATCH] Add backup reminder --- invoke/luanti/tasks.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/invoke/luanti/tasks.py b/invoke/luanti/tasks.py index 45d340f..14636ad 100644 --- a/invoke/luanti/tasks.py +++ b/invoke/luanti/tasks.py @@ -10,6 +10,7 @@ mod_dir = f"{root}/mods" easy_dir = f"{home}/minetest/" run_mt = f"flatpak run net.minetest.Minetest" world_dir = f"{root}/worlds" +scripts = f"{home}/ansible/luanti" # flatpak link_to = f"{home}/.var/app/net.minetest.Minetest/.minetest" @@ -133,3 +134,17 @@ def logs(c, lines=20): '''Output some logs''' c.run(f"tail -n {lines} {root}/debug.txt") +@task +def backup(c): + stopped = input("Is the server stopped?") + if(stopped != 'y'): + print("so go stop the server...") + exit() + print("okay...backing up.") + c.run(f"{scripts}/do_luanti.sh {scripts}/backup.sh") + c.run(f"{scripts}/check_db.sh") + +@task +def checkdb(c): + c.run(f"{scripts}/check_db.sh") + -- 2.47.3