Skip to content

Commit

Permalink
Merge pull request #549 from konstruktoid/issue548
Browse files Browse the repository at this point in the history
include /run in get_service_file
  • Loading branch information
konstruktoid authored Apr 16, 2024
2 parents c495b3a + 9669294 commit 2311026
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion functions/helper_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ get_service_file() {
echo "/lib/systemd/system/$SERVICE"
return
fi
if systemctl show -p FragmentPath "$SERVICE" 2> /dev/null 1>&2; then
if find /run -name "$SERVICE" 2> /dev/null 1>&2; then
find /run -name "$SERVICE" | head -n1
return
fi
if [ "$(systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//')" != "" ]; then
systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//'
return
fi
Expand Down

0 comments on commit 2311026

Please sign in to comment.