mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-23 21:55:09 +02:00
daemon running msg was wrong (#262)
* daemon running msg was wrong (it was printing the install message). Fixed to a daemon running specific message. * move footer after the daemon check func
This commit is contained in:
parent
fe88eaf02e
commit
37ae7b199a
@ -1059,12 +1059,17 @@ def is_running(program, argument):
|
|||||||
print(repr(e))
|
print(repr(e))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
def daemon_running_msg():
|
||||||
|
print("\n" + "-" * 24 + " auto-cpufreq running " + "-" * 30 + "\n")
|
||||||
|
print(
|
||||||
|
'ERROR: auto-cpufreq is running in daemon mode.\n\nMake sure to stop the deamon before running with --live or --monitor mode'
|
||||||
|
)
|
||||||
|
|
||||||
# check if auto-cpufreq --daemon is running
|
# check if auto-cpufreq --daemon is running
|
||||||
def running_daemon():
|
def running_daemon():
|
||||||
if is_running("auto-cpufreq", "--daemon"):
|
if is_running("auto-cpufreq", "--daemon"):
|
||||||
deploy_complete_msg()
|
daemon_running_msg()
|
||||||
exit(1)
|
exit(1)
|
||||||
elif os.getenv("PKG_MARKER") == "SNAP" and dcheck == "enabled":
|
elif os.getenv("PKG_MARKER") == "SNAP" and dcheck == "enabled":
|
||||||
deploy_complete_msg()
|
daemon_running_msg()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -72,8 +72,8 @@ def main(config, daemon, debug, install, live, log, monitor, stats, version, don
|
|||||||
print("\nNote: You can quit monitor mode by pressing \"ctrl+c\"")
|
print("\nNote: You can quit monitor mode by pressing \"ctrl+c\"")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
root_check()
|
root_check()
|
||||||
footer()
|
|
||||||
running_daemon()
|
running_daemon()
|
||||||
|
footer()
|
||||||
gov_check()
|
gov_check()
|
||||||
cpufreqctl()
|
cpufreqctl()
|
||||||
distro_info()
|
distro_info()
|
||||||
@ -86,8 +86,8 @@ def main(config, daemon, debug, install, live, log, monitor, stats, version, don
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
while True:
|
while True:
|
||||||
root_check()
|
root_check()
|
||||||
footer()
|
|
||||||
running_daemon()
|
running_daemon()
|
||||||
|
footer()
|
||||||
gov_check()
|
gov_check()
|
||||||
cpufreqctl()
|
cpufreqctl()
|
||||||
distro_info()
|
distro_info()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user