import time import os.path import subprocess import shlex import random from sys import argv #time.sleep(float(argv[1])) if os.path.isfile('/tmp/signal'): os.remove('/tmp/signal') exit() else: open('/tmp/signal', "w").close() subprocess.call(shlex.split('env DISPLAY=:0 lua lo.lua')) while True: if os.path.isfile('/tmp/signal'): subprocess.call(shlex.split('env DISPLAY=:0 sh l211.sh')) x = random.randint(183, 317) x1 = "0.1" x = str(x) x1 = str(x1) x = x1 + x x = float(x) print(x) time.sleep(x) subprocess.call(shlex.split('env DISPLAY=:0 sh l212.sh')) x = random.randint(212, 293) x1 = "0.1" x = str(x) x1 = str(x1) x = x1 + x x = float(x) time.sleep(x) else: break