service: fixed path to binary, auto install service
diff --git a/Makefile.am b/Makefile.am
index a5910e6..c7031e9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,15 @@
 if HAVE_SYSTEMD
 systemddir=@SYSTEMD_UNIT_DIR@
 systemd_DATA=netopeerguid.service
+
+install-exec-hook:
+	@systemctl enable netopeerguid
+	@systemctl --system daemon-reload 2>/dev/null|| true
+	@echo "Run as root: service netopeerguid start"
+else
+install-exec-hook:
+	@chkconfig --add netopeerguid.rc
+	@echo "Run as root: service netopeerguid.rc start"
 endif
 
 if MAKE_RPMS