Created
March 19, 2023 19:05
-
-
Save deadjakk/04fe1722a061a2580b5f39ff3840c3e8 to your computer and use it in GitHub Desktop.
OpenRC battery_monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
# to install: cargo install --git https://git.sr.ht/~deadjakk/batt-monitor | |
name="battery_monitor" | |
description="auto shutoff at 20% battery to prevent data loss" | |
command_user="root:root" | |
pidfile="/run/${RC_SVCNAME}.pid" | |
command="/sbin/battery_monitor" | |
command_args="-c /usr/sbin/hibernate-ram" | |
command_background=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment