from django.apps import AppConfig import subprocess import sys import os path = os.path.dirname(os.path.abspath(__file__)) + "/assets/bots/geoffrey.py" class GeoffreyAppConfig(AppConfig): name = 'GeoffreyApp' verbose_name = "Geoffrey: Minecraft Web Database" def ready(self): import GeoffreyApp.background_tasks as background_tasks background_tasks.run_tasks() #subprocess.run('screen -X -S "{0}" quit'.format("geoffrey"), shell=True) #subprocess.run( # 'screen -S geoffrey -d -m {} {}'.format(sys.executable, path), # shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)