feat(moonarch-git): package battery conservation mode assets
Add udev rule and systemd service to PKGBUILD. Create /var/lib/moonarch state directory and enable batsaver restore service on laptops in the post-install hook.
This commit is contained in:
@@ -71,6 +71,12 @@ post_install() {
|
||||
rm -f /usr/local/bin/swww /usr/local/bin/swww-daemon 2>/dev/null || true
|
||||
rm -f /usr/local/bin/moonarch-update 2>/dev/null || true
|
||||
|
||||
# Battery conservation mode: create state directory and enable restore service
|
||||
install -dm775 -g wheel /var/lib/moonarch
|
||||
if [ -f /sys/class/power_supply/BAT0/charge_control_end_threshold ]; then
|
||||
systemctl enable moonarch-batsaver.service 2>/dev/null || true
|
||||
fi
|
||||
|
||||
echo "==> Moonarch defaults installed."
|
||||
echo "==> For first-time setup run: /opt/moonarch/scripts/post-install.sh"
|
||||
echo "==> This enables services and configures firewall."
|
||||
|
||||
Reference in New Issue
Block a user