Skip to content

Commit

Permalink
Fix restartservice failure for systemd
Browse files Browse the repository at this point in the history
Ubuntu 16.04 LTS service manager have been switched to systemd,
HTTP service name should be apache2 on Ubuntu, but not httpd.

Signed-off-by: guessi <[email protected]>
  • Loading branch information
guessi committed Apr 25, 2016
1 parent 8e972ca commit b3ef39e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ restartservices:
/sbin/service apache2 restart; \
fi; \
elif [ -x /bin/systemctl ]; then \
/bin/systemctl restart httpd.service; \
if [ -d /lib/systemd/system/apache2.service.d ]; then \
/bin/systemctl restart apache2.service; \
else \
/bin/systemctl restart httpd.service; \
fi \
else \
/usr/sbin/service cobblerd restart; \
/usr/sbin/service apache2 restart; \
Expand Down

0 comments on commit b3ef39e

Please sign in to comment.