]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - invoke/luanti-remote/tasks.py
Add screen to luanti remote invoke
[dotfiles.git] / 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)