extended disable running multiple instances functionality to snap
This commit is contained in:
parent
33837c97a3
commit
16bc315da2
|
@ -57,7 +57,7 @@ def main(monitor, live, daemon, install, log):
|
||||||
elif monitor:
|
elif monitor:
|
||||||
while True:
|
while True:
|
||||||
root_check()
|
root_check()
|
||||||
running_daemon() # doesn't work on snap
|
running_daemon()
|
||||||
gov_check()
|
gov_check()
|
||||||
cpufreqctl()
|
cpufreqctl()
|
||||||
sysinfo()
|
sysinfo()
|
||||||
|
@ -67,7 +67,7 @@ def main(monitor, live, daemon, install, log):
|
||||||
elif live:
|
elif live:
|
||||||
while True:
|
while True:
|
||||||
root_check()
|
root_check()
|
||||||
running_daemon() # doesn't work on snap
|
running_daemon()
|
||||||
gov_check()
|
gov_check()
|
||||||
cpufreqctl()
|
cpufreqctl()
|
||||||
sysinfo()
|
sysinfo()
|
||||||
|
@ -80,14 +80,14 @@ def main(monitor, live, daemon, install, log):
|
||||||
elif install:
|
elif install:
|
||||||
if os.getenv('PKG_MARKER') == "SNAP":
|
if os.getenv('PKG_MARKER') == "SNAP":
|
||||||
root_check()
|
root_check()
|
||||||
running_daemon() # doesn't work on snap
|
running_daemon()
|
||||||
gov_check()
|
gov_check()
|
||||||
s.run("snapctl set daemon=enabled", shell=True)
|
s.run("snapctl set daemon=enabled", shell=True)
|
||||||
s.run("snapctl start --enable auto-cpufreq", shell=True)
|
s.run("snapctl start --enable auto-cpufreq", shell=True)
|
||||||
deploy_complete_msg()
|
deploy_complete_msg()
|
||||||
else:
|
else:
|
||||||
root_check()
|
root_check()
|
||||||
running_daemon() # doesn't work on snap
|
running_daemon()
|
||||||
gov_check()
|
gov_check()
|
||||||
deploy()
|
deploy()
|
||||||
deploy_complete_msg()
|
deploy_complete_msg()
|
||||||
|
|
|
@ -414,3 +414,6 @@ def running_daemon():
|
||||||
if is_running('auto-cpufreq', '--daemon'):
|
if is_running('auto-cpufreq', '--daemon'):
|
||||||
deploy_complete_msg()
|
deploy_complete_msg()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
elif os.getenv("PKG_MARKER") == "SNAP" and dcheck == "enabled":
|
||||||
|
deploy_complete_msg()
|
||||||
|
exit(1)
|
Loading…
Reference in New Issue