Files
Iris/mopidy_iris/system.py
2018-11-02 10:20:32 +13:00

19 lines
481 B
Python
Executable File

import logging, pykka, subprocess, os
# import logger
logger = logging.getLogger(__name__)
class IrisSystemActor(pykka.ThreadingActor):
def __init__(self):
super(IrisSystemActor, self).__init__()
##
# Someone is telling us to do something
##
def run(self, action):
path = os.path.dirname(__file__)
return subprocess.check_output(["sudo "+path+"/system.sh "+action], shell=True)
actor_ref = IrisSystemActor.start()