1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-12-04 14:46:37 -05:00

add uninstall-inetd without update-inetd

This commit is contained in:
Yargo 2019-03-09 21:06:38 +00:00
parent f9bbe46a03
commit 7c2645b43d

View File

@ -196,7 +196,7 @@ install-root:
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 \
echo update-inetd worked ; \ echo update-inetd install 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)" ; \
@ -264,16 +264,23 @@ install-systemd: install-files install-docs install-root
# #
# Uninstall targets # Uninstall targets
# #
uninstall: uninstall-xinetd uninstall-launchd uninstall-systemd uninstall: uninstall-xinetd uninstall-launchd uninstall-systemd uninstall-inetd
rm -f $(SBINDIR)/$(BINARY) rm -f $(SBINDIR)/$(BINARY)
for DOC in $(DOCS); do rm -f $(DOCDIR)/$$DOC; done for DOC in $(DOCS); do rm -f $(DOCDIR)/$$DOC; done
rmdir -p $(SBINDIR) $(DOCDIR) 2>/dev/null || true rmdir -p $(SBINDIR) $(DOCDIR) 2>/dev/null || true
@echo @echo
uninstall-inetd: uninstall-inetd:
if [ -f "$(INETD)" ]; then \ @if [ -f "$(INETD)" ] && update-inetd --remove "^gopher.*gophernicus" ; then \
update-inetd --remove "^gopher.*gophernicus" echo update-inetd remove worked ; \
else if grep '^gopher' $(INETD) >/dev/null 2>&1 && \
sed -i .bak -e 's/^gopher/#gopher/' $(INETD) ; then \
echo "commented out gopher entry in $(INETD), reloading inetd" ; \
[ -r $(INETPID) ] && kill -HUP `cat $(INETPID)` ; \
else echo "::::: could not find gopher entry in $(INETD) :::::" ; \
fi ; \
fi fi
@echo
uninstall-xinetd: uninstall-xinetd:
if grep -q $(BINARY) "$(XINETD)/gopher" 2>/dev/null; then \ if grep -q $(BINARY) "$(XINETD)/gopher" 2>/dev/null; then \