Skip to content

Commit

Permalink
sway-user-service: fix reset-failed units
Browse files Browse the repository at this point in the history
  • Loading branch information
xdbob committed Mar 23, 2020
1 parent 52d395b commit cd1b01f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions bin/sway-user-service
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
# reset them so that they don't break this startup
for unit in $(systemctl --user --no-legend --state=failed list-units | cut -f1 -d' '); do
partof="$(systemctl --user show -p PartOf --value "$unit")"
if [ "$partof" = "graphical-session.target" ] || [ "$partof" = "wayland-session.target" ]; then
systemctl --user reset-failed "$unit"
fi
for target in sway-session.target wayland-session.target graphical-session.target; do
if [ "$partof" = "$target" ]; then
systemctl --user reset-failed "$unit"
break
fi
done
done

# /etc/profice contains a log of important environment variables
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('sway-services',
[],
meson_version: '>=0.47'
meson_version: '>=0.49'
)

subdir('bin')
Expand Down

0 comments on commit cd1b01f

Please sign in to comment.