mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-01-03 14:56:43 -05:00
correct handling of inetd.conf modification and restart
This commit is contained in:
parent
df6adc5bb2
commit
f9bbe46a03
16
Makefile
16
Makefile
@ -34,6 +34,7 @@ MAP = gophermap
|
|||||||
INETD = /etc/inetd.conf
|
INETD = /etc/inetd.conf
|
||||||
XINETD = /etc/xinetd.d
|
XINETD = /etc/xinetd.d
|
||||||
INETLIN = "gopher stream tcp nowait nobody $(SBINDIR)/$(BINARY) $(BINARY) -h `hostname`"
|
INETLIN = "gopher stream tcp nowait nobody $(SBINDIR)/$(BINARY) $(BINARY) -h `hostname`"
|
||||||
|
INETPID = /var/run/inetd.pid
|
||||||
LAUNCHD = /Library/LaunchDaemons
|
LAUNCHD = /Library/LaunchDaemons
|
||||||
PLIST = org.$(NAME).server.plist
|
PLIST = org.$(NAME).server.plist
|
||||||
NET_SRV = /boot/common/settings/network/services
|
NET_SRV = /boot/common/settings/network/services
|
||||||
@ -158,6 +159,7 @@ install-done:
|
|||||||
@echo
|
@echo
|
||||||
@echo "======================================================================"
|
@echo "======================================================================"
|
||||||
@echo
|
@echo
|
||||||
|
@echo "If there were no errors shown above,"
|
||||||
@echo "Gophernicus has now been succesfully installed. To try it out, launch"
|
@echo "Gophernicus has now been succesfully installed. To try it out, launch"
|
||||||
@echo "your favorite gopher browser and navigate to your gopher root."
|
@echo "your favorite gopher browser and navigate to your gopher root."
|
||||||
@echo
|
@echo
|
||||||
@ -174,7 +176,7 @@ install-done:
|
|||||||
@echo "======================================================================"
|
@echo "======================================================================"
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
install-files:
|
install-files: $(BINARY)
|
||||||
mkdir -p $(SBINDIR)
|
mkdir -p $(SBINDIR)
|
||||||
$(INSTALL) -s -m 755 $(BINARY) $(SBINDIR)
|
$(INSTALL) -s -m 755 $(BINARY) $(SBINDIR)
|
||||||
@echo
|
@echo
|
||||||
@ -193,14 +195,14 @@ install-root:
|
|||||||
@echo
|
@echo
|
||||||
|
|
||||||
install-inetd: install-files install-docs install-root
|
install-inetd: install-files install-docs install-root
|
||||||
if update-inetd --add "$(INETLIN)"; then \
|
@if update-inetd --add "$(INETLIN)"; then \
|
||||||
: update-inetd worked ; \
|
echo update-inetd worked ; \
|
||||||
else if grep '^gopher' $(INETD) >/dev/null 2>&1 ; then \
|
else if grep '^gopher' $(INETD) >/dev/null 2>&1 ; then \
|
||||||
echo "gopher entry in $(INETD) already present -- please check!"; \
|
echo "::::: gopher entry in $(INETD) already present -- please check! :::::"; \
|
||||||
else echo "trying to add gopher entry to $(INETD)" ; \
|
else echo "trying to add gopher entry to $(INETD)" ; \
|
||||||
cat "$(INETLIN)" >> $(INETD) ; \
|
echo "$(INETLIN)" >> $(INETD) ; \
|
||||||
if [ -r $(INETPID) ] ; then kill -HUP $(INETPID) ; \
|
if [ -r $(INETPID) ] ; then kill -HUP `cat $(INETPID)` ; \
|
||||||
else echo "no PID for inetd found, not restarted -- please check!" ; fi ; \
|
else echo "::::: no PID for inetd found, not restarted -- please check! :::::" ; fi ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
fi
|
fi
|
||||||
@echo
|
@echo
|
||||||
|
Loading…
Reference in New Issue
Block a user