Restarts handled via systemd now

This commit is contained in:
Ryan Hughes
2025-12-14 11:09:16 -05:00
parent 33eabb0c88
commit 4194c649a1

View File

@@ -1,8 +1,5 @@
#!/bin/bash
pkill elephant
pkill walker
# Detect if we're running as root (from pacman hook)
if [[ $EUID -eq 0 ]]; then
# Get the owner of this script to determine which user to run as
@@ -13,10 +10,9 @@ if [[ $EUID -eq 0 ]]; then
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
bash -c "
systemctl --user restart elephant.service
setsid walker --gapplication-service &
systemctl --user restart app-walker@autostart.service
"
else
elephant service enable 2>/dev/null
systemctl --user restart elephant.service
setsid walker --gapplication-service &
systemctl --user restart app-walker@autostart.service
fi