]> apps.delaporte.us Git - dotfiles.git/commitdiff
Add screen to luanti remote invoke
authorEdward Delaporte <edward@delaporte.us>
Sun, 7 Dec 2025 23:42:14 +0000 (17:42 -0600)
committerEdward Delaporte <edward@delaporte.us>
Sun, 7 Dec 2025 23:42:14 +0000 (17:42 -0600)
invoke/luanti-remote/tasks.py

index e6f5915221cc73122a7d4c7ddaf386d28cb40464..75b7e39a3425961052d53da3d093ebe4c48c211e 100644 (file)
@@ -9,7 +9,7 @@ LOCAL_HOME=os.environ.get('HOME')
 TODAY = dt.now().strftime('%Y.%m.%d')
 
 WORLD='world'
-SERVE=f'{HOME}/luanti/bin/luantiserver --gameid minetest --worldname world'
+SERVE=f'screen -d -m {HOME}/luanti/bin/luantiserver --gameid minetest --worldname world'
 
 SSH=f'ssh {USER}@{IP}'
 SCP=f'scp {USER}@{IP}'
@@ -65,4 +65,6 @@ def verify_backup(c):
 @task(verify_backup)
 def serve(c):
     print(f"Attempting to connect to {IP}")
-    c.run(f'ssh {USER}@{IP} -C {SERVE}')
+    result = c.run(f'ssh {USER}@{IP} -C {SERVE}')
+    print(f'Server should now be running in a remote screen session.')
+    print(result)