Don't hardcode commands paths

Don't assume that utilities such as systemctl or initctl is found in a certain
specific path. Instead look for them in $PATH. This applies to both the
Makefile and the NetworkManager dispatcher script.

Resolves #11.
This commit is contained in:
Tore Anderson
2017-08-15 17:46:54 +02:00
parent 18dca086c2
commit 6c7c2d2a92
2 changed files with 16 additions and 10 deletions

View File

@@ -26,8 +26,8 @@
# start from scratch than to figure out if a restart is truly necessary
# systemd-based distros
if test -x /usr/bin/systemctl; then
/usr/bin/systemctl restart clatd.service
if which systemctl &> /dev/null; then
systemctl restart clatd.service
fi
# upstart-based distros