Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset change behaviour when process is interrupted. #5

Open
monomycelium opened this issue Aug 22, 2024 · 0 comments
Open

Reset change behaviour when process is interrupted. #5

monomycelium opened this issue Aug 22, 2024 · 0 comments

Comments

@monomycelium
Copy link
Contributor

In the systemd unit file in extra, the following line seems suspicious:

ExecStop=echo auto > /sys/class/power_supply/macsmc-battery/charge_behaviour

I think the output is not exactly being redirected:

# systemctl status asahi-battery-threshold.service
...
Aug 22 21:38:36 ace echo[17690]: auto > /sys/class/power_supply/macsmc-battery/charge_behaviour
...

It seems that systemd does not interpret the shell redirection syntax in the ExecStop directive. While spawning a shell is possible, I think it would be better for the daemon to reset charge_behaviour to its original value when it is interrupted (by intercepting SIGINT and SIGTERM). I am willing to make a PR to do so when I am free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant