Add a message when using --config-reload only

This commit is contained in:
Angel-Karasu 2024-07-31 13:23:29 +02:00
parent 8f1d46401f
commit 13391b6aa4

View File

@ -23,7 +23,7 @@ from auto_cpufreq.power_helper import *
@click.option("--remove", is_flag=True, help="Remove daemon for (permanent) automatic CPU optimizations")
@click.option("--force", is_flag=False, help="Force use of either \"powersave\" or \"performance\" governors. Setting to \"reset\" will go back to normal mode")
@click.option("--config", is_flag=False, required=False, help="Use config file at defined path")
@click.option("--config-reload", is_flag=True, help="Reload auto-cpufreq daemon|monitor|live to pick up changes made in auto-cpufreq config file")
@click.option("--config-reload", is_flag=True, help="Reload auto-cpufreq monitor|live|daemon to pick up changes made in auto-cpufreq config file")
@click.option("--stats", is_flag=True, help="View live stats of CPU optimizations made by daemon")
@click.option("--get-state", is_flag=True, hidden=True)
@click.option("--completions", is_flag=False, help="Enables shell completions for bash, zsh and fish.\n Possible values bash|zsh|fish")
@ -31,6 +31,8 @@ from auto_cpufreq.power_helper import *
@click.option("--version", is_flag=True, help="Show currently installed version")
@click.option("--donate", is_flag=True, help="Support the project")
def main(monitor, live, daemon, install, update, remove, force, config, config_reload, stats, get_state, completions, debug, version, donate):
if config_reload and not (monitor or live or daemon): print('Error: Use --config-reload command with --monitor|live|daemon')
if len(sys.argv) == 1:
print("\n" + "-" * 32 + " auto-cpufreq " + "-" * 33 + "\n")
print("Automatic CPU speed & power optimizer for Linux")