Skip to content

Commit 2311026

Browse files
authored
Merge pull request #549 from konstruktoid/issue548
include /run in get_service_file
2 parents c495b3a + 9669294 commit 2311026

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

functions/helper_lib.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ get_service_file() {
140140
echo "/lib/systemd/system/$SERVICE"
141141
return
142142
fi
143-
if systemctl show -p FragmentPath "$SERVICE" 2> /dev/null 1>&2; then
143+
if find /run -name "$SERVICE" 2> /dev/null 1>&2; then
144+
find /run -name "$SERVICE" | head -n1
145+
return
146+
fi
147+
if [ "$(systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//')" != "" ]; then
144148
systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//'
145149
return
146150
fi

0 commit comments

Comments
 (0)