extended disable running multiple instances functionality to snap

This commit is contained in:
Adnan Hodzic 2020-02-08 20:35:39 +01:00
parent 33837c97a3
commit 16bc315da2
2 changed files with 7 additions and 4 deletions

View File

@ -57,7 +57,7 @@ def main(monitor, live, daemon, install, log):
elif monitor:
while True:
root_check()
running_daemon() # doesn't work on snap
running_daemon()
gov_check()
cpufreqctl()
sysinfo()
@ -67,7 +67,7 @@ def main(monitor, live, daemon, install, log):
elif live:
while True:
root_check()
running_daemon() # doesn't work on snap
running_daemon()
gov_check()
cpufreqctl()
sysinfo()
@ -80,14 +80,14 @@ def main(monitor, live, daemon, install, log):
elif install:
if os.getenv('PKG_MARKER') == "SNAP":
root_check()
running_daemon() # doesn't work on snap
running_daemon()
gov_check()
s.run("snapctl set daemon=enabled", shell=True)
s.run("snapctl start --enable auto-cpufreq", shell=True)
deploy_complete_msg()
else:
root_check()
running_daemon() # doesn't work on snap
running_daemon()
gov_check()
deploy()
deploy_complete_msg()

View File

@ -412,5 +412,8 @@ def is_running(program, argument):
# check if auto-cpufreq --daemon is running
def running_daemon():
if is_running('auto-cpufreq', '--daemon'):
deploy_complete_msg()
exit(1)
elif os.getenv("PKG_MARKER") == "SNAP" and dcheck == "enabled":
deploy_complete_msg()
exit(1)