From 227c92efdcaf91f4dbfa9910a151474325a2a880 Mon Sep 17 00:00:00 2001 From: jenz Date: Wed, 18 May 2022 23:41:52 +0200 Subject: [PATCH] updated services again and exiting behaviour --- AutismBotIngame/python/ingamefollowct.py | 13 ++++++------- AutismBotIngame/python/run_autismbot.sh | 4 ---- 2 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 AutismBotIngame/python/run_autismbot.sh diff --git a/AutismBotIngame/python/ingamefollowct.py b/AutismBotIngame/python/ingamefollowct.py index 251ab231..80749879 100644 --- a/AutismBotIngame/python/ingamefollowct.py +++ b/AutismBotIngame/python/ingamefollowct.py @@ -1,3 +1,4 @@ +#!/home/autismbot1/ze_runner/venv/bin/python3 import os import sys import subprocess @@ -184,13 +185,10 @@ if __name__ == '__main__': elif "connect to" in data: if connection_issue_counter == 20: kill_owned_process("pidof hl2_linux") - launch_css_process() - connected_to_other = False - elif connection_issue_counter == 50: - restart_sdl_and_steam() - launch_css_process() - connected_to_other = False - connection_issue_counter = -10 + print('exiting') + sys.exit(1) + + if not connected_to_other or "connect to ze" == data: print('data: ', data) connection_issue_counter += 1 @@ -222,6 +220,7 @@ if __name__ == '__main__': #X2GO_NXAGENT_DEFAULT_OPTIONS="-options nx/nx,sleep=0" /etc/x2go/x2goagent.options #keeps session as R instead of S which is needed for interaction with graphical components such as steam and CS:S + """ .bashrc requires: if [[ $DISPLAY ]]; then diff --git a/AutismBotIngame/python/run_autismbot.sh b/AutismBotIngame/python/run_autismbot.sh deleted file mode 100644 index 9ac880d3..00000000 --- a/AutismBotIngame/python/run_autismbot.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -cd "$(dirname "$0")" -source venv/bin/activate -python3 -u ingamefollowct.py