(fix) Make batterylimit.service work properly

It seems that you cannot use input redirection directly when running the command. Pass the command to bash instead to process it correctly.
This commit is contained in:
Marco Rodolfi 2023-08-25 13:42:37 +02:00 committed by GitHub
parent 54907ea905
commit 1e0db74af7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ Description=Service for setting the Steam Deck Battery Charging Limit
[Service]
Type=oneshot
EnvironmentFile=-/etc/default/%p
ExecStart=echo ${MAX_BATTERY_CHARGE_LEVEL} > /sys/class/hwmon/hwmon*/max_battery_charge_level
ExecStart=/usr/bin/bash -c "echo ${MAX_BATTERY_CHARGE_LEVEL} > /sys/class/hwmon/hwmon*/max_battery_charge_level"
[Install]
WantedBy=multi-user.target