Use install instead of cp -p to ensure root ownership of sleep hook

cp -p preserves the original user ownership from ~/.local/share/omarchy,
which would allow an unprivileged user to modify a script that runs as
root during suspend/hibernate.
This commit is contained in:
Alan Sikora
2026-03-08 22:30:56 -03:00
parent 24ca8e2bff
commit a89c4f849d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
echo "Install system-sleep hook to unmount FUSE before suspend/hibernate"
sudo mkdir -p /usr/lib/systemd/system-sleep
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/unmount-fuse" /usr/lib/systemd/system-sleep/
sudo install -m 0755 -o root -g root "$OMARCHY_PATH/default/systemd/system-sleep/unmount-fuse" /usr/lib/systemd/system-sleep/