Skip to content

Commit

Permalink
[auto-brightness] fix install script
Browse files Browse the repository at this point in the history
  • Loading branch information
pom committed Sep 17, 2022
1 parent 705ef50 commit c35dbb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/auto-brightness/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cp auto-brightness.json /etc/

mkdir -p /opt/auto-brightness/bin/

systemctl --machine=pom@.host --user stop auto-brightness
systemctl --machine=$SUDO_USER@.host --user stop auto-brightness

if test "$ID" = "manjaro" -o "$ID" = "arch" -o "$ID_LIKE" = "arch"; then
cp auto-brightness.archlinux /opt/auto-brightness/bin/auto-brightness
Expand All @@ -27,6 +27,6 @@ runuser -u $SUDO_USER -- mkdir -p /home/$SUDO_USER/.config/systemd/user

runuser -u $SUDO_USER -- cp auto-brightness.service /home/$SUDO_USER/.config/systemd/user/auto-brightness.service

systemctl --machine=pom@.host --user enable /home/$SUDO_USER/.config/systemd/user/auto-brightness.service
systemctl --machine=$SUDO_USER@.host --user enable /home/$SUDO_USER/.config/systemd/user/auto-brightness.service

systemctl --machine=pom@.host --user start auto-brightness
systemctl --machine=$SUDO_USER@.host --user start auto-brightness
4 changes: 2 additions & 2 deletions drivers/auto-brightness/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if test -z "$SUDO_USER"; then
exit 1
fi

systemctl --machine=pom@.host --user stop auto-brightness
systemctl --machine=$SUDO_USER@.host --user stop auto-brightness

systemctl --machine=pom@.host --user disable /home/$SUDO_USER/.config/systemd/user/auto-brightness.service
systemctl --machine=$SUDO_USER@.host --user disable /home/$SUDO_USER/.config/systemd/user/auto-brightness.service

runuser -u $SUDO_USER -- rm /home/$SUDO_USER/.config/systemd/user/auto-brightness.service

Expand Down

0 comments on commit c35dbb8

Please sign in to comment.