added extra instruction for readme
This commit is contained in:
parent
44cd674f49
commit
f43e56e5ec
@ -79,3 +79,7 @@ chmod 755 -R /tmp/dumps
|
||||
|
||||
remember to remove source_engine*.lock files from /tmp if they tend to clamp things up.
|
||||
now using tigervnc instead of x2go.
|
||||
|
||||
vncviewer -SecurityTypes VncAuth,TLSVnc ip:X Display
|
||||
|
||||
for example: vncviewer -SecurityTypes VncAuth,TLSVnc 127.0.0.1:1
|
||||
|
@ -5,5 +5,6 @@
|
||||
"discord_bot_ip": "****",
|
||||
"server_ip_port_ze": "****:****",
|
||||
"server_ip_port_ze2": "****:****",
|
||||
"ovh_ip": "*******"
|
||||
"ovh_ip": "*******",
|
||||
"magic_secret": "*****"
|
||||
}
|
||||
|
@ -28,8 +28,13 @@ def writeCfgInput(Input_user):
|
||||
with open(looptestPath, 'w') as f:
|
||||
f.write(Input_user)
|
||||
#print("wrote to file: ", Input_user)
|
||||
#time.sleep(10.0)
|
||||
time.sleep(0.1)
|
||||
if "connect to" in Input_user:
|
||||
time.sleep(1.0)
|
||||
elif "wait" in Input_user:
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
time.sleep(0.5)
|
||||
open(looptestPath, 'w').close() #clearing file.
|
||||
|
||||
def clean_up_files():
|
||||
#deleting POSIX shared memory objects, as long as one process has them open they exist. THis is to prevent /dev/shm from being full
|
||||
@ -126,9 +131,8 @@ def restart_sdl_and_steam():
|
||||
subprocess.getoutput([f'vncserver -kill']) #only displays vncservers for the specific user.
|
||||
time.sleep(5)
|
||||
|
||||
#cmd = f'vncserver -localhost no -geometry 1x1 -depth 24'
|
||||
cmd = f'vncserver -localhost no -geometry 1x1 -depth 24'
|
||||
print(f'cmd: {cmd}')
|
||||
#print(f'cmd: {cmd}')
|
||||
subprocess.getoutput([cmd])
|
||||
print('reached .bashrc executing steam and variables')
|
||||
time.sleep(10)
|
||||
@ -143,7 +147,16 @@ def bot_connect(data):
|
||||
str1 = f"connect {data_ports['server_ip_port_ze2']}; wait 15000;"
|
||||
writeCfgInput(str1)
|
||||
time.sleep(1)
|
||||
writeCfgInput("")
|
||||
|
||||
while True:
|
||||
still_downloading_map = False
|
||||
for f in glob.glob(f"/home/{whoami}/.steam/debian-installation/steamapps/common/Counter-Strike Source/cstrike/download/maps/*.bz2"):
|
||||
print('found f in bot_connect, so downloadig map?: ', f)
|
||||
still_downloading_map = True
|
||||
break
|
||||
if not still_downloading_map:
|
||||
break
|
||||
time.sleep(10)
|
||||
t = Timer(30, attempt_bot_connect)
|
||||
t.start()
|
||||
|
||||
@ -266,8 +279,8 @@ if __name__ == '__main__':
|
||||
print("connection_issue_counter: ", connection_issue_counter)
|
||||
bot_connect(data)
|
||||
elif "clientmessage:" in data:
|
||||
messager_name = data.split("clientmessage:", 1)[1].split("magic_code_here")[0]
|
||||
databyte_send_message = messager_name + data.split("magic_code_here")[1]
|
||||
messager_name = data.split("clientmessage:", 1)[1].split(f" {data_ports['magic_secret']}")[0]
|
||||
databyte_send_message = messager_name + data.split(f"{data_ports['magic_secret']}")[1]
|
||||
sock.sendto(databyte_send_message.encode(), (data_ports["discord_bot_ip"], external_port_messages))
|
||||
#print('databyte_send_message: ', databyte_send_message)
|
||||
elif data.startswith("dist_target:"):
|
||||
@ -283,4 +296,4 @@ if __name__ == '__main__':
|
||||
strInput += "+duck; wait 50; -duck; wait 5; "
|
||||
writeCfgInput(strInput)
|
||||
finally:
|
||||
sock.close()
|
||||
sock.close(
|
||||
|
Loading…
Reference in New Issue
Block a user