[ -d /run/systemd/system ] || exit 0
- users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
-
- if [[ "$command" =~ reexec ]]; then
- for user in $users; do
- SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT_SEC}}s \
- systemctl --user -M "$user@" daemon-reexec &
- done
- wait
- fi
-
- if [[ "$command" =~ reload ]]; then
- for user in $users; do
- SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT_SEC}}s \
- systemctl --user -M "$user@" daemon-reload &
- done
- wait
+ if [[ "$command" =~ reexec|reload ]]; then
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT_SEC}}s systemctl reload "user@*.service"
fi
if [[ "$command" =~ restart ]]; then
+ users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
+
for user in $users; do
SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT_SEC}}s \
systemctl --user -M "$user@" reload-or-restart --marked &