Created
April 26, 2021 21:29
-
-
Save publicarray/0a069f461abbe9ef7ec8e6ff02eb46de to your computer and use it in GitHub Desktop.
Limit battery charge - /etc/systemd/system/battery-charge-threshold.service
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
[Unit] | |
Description=Set the battery charge threshold | |
After=multi-user.target | |
StartLimitBurst=0 | |
[Service] | |
Type=oneshot | |
Restart=on-failure | |
ExecStart=/bin/bash -c 'echo 70 > /sys/class/power_supply/BAT0/charge_control_end_threshold' | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment