mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Prevent error if service doesn't exist
This commit is contained in:
@@ -9,10 +9,20 @@ if [[ $EUID -eq 0 ]]; then
|
|||||||
# Restart services as the script owner
|
# Restart services as the script owner
|
||||||
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
|
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
|
||||||
bash -c "
|
bash -c "
|
||||||
systemctl --user restart elephant.service
|
if systemctl --user is-enabled elephant.service &>/dev/null; then
|
||||||
systemctl --user restart app-walker@autostart.service
|
systemctl --user restart elephant.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
if systemctl --user is-enabled app-walker@autostart.service &>/dev/null; then
|
||||||
|
systemctl --user restart app-walker@autostart.service
|
||||||
|
fi
|
||||||
"
|
"
|
||||||
else
|
else
|
||||||
systemctl --user restart elephant.service
|
if systemctl --user is-enabled elephant.service &>/dev/null; then
|
||||||
systemctl --user restart app-walker@autostart.service
|
systemctl --user restart elephant.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
if systemctl --user is-enabled app-walker@autostart.service &>/dev/null; then
|
||||||
|
systemctl --user restart app-walker@autostart.service
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user