include /run in get_service_file

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2024-04-11 21:45:15 +00:00
parent 820abe98c3
commit e081393ad7
No known key found for this signature in database

View file

@ -144,6 +144,10 @@ get_service_file() {
systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//'
return
fi
if find /run -name "$SERVICE" 2> /dev/null 1>&2; then
find /run -name "$SERVICE" | head -n1
return
fi
echo "/usr/lib/systemd/system/$SERVICE"
}