mirror of
https://github.com/gophernicus/gophernicus.git
synced 2024-12-04 14:46:37 -05:00
Move configuration from systemd unit file to separate enviroment file
This commit is contained in:
parent
b1963aeea5
commit
989db4a482
10
Makefile
10
Makefile
@ -32,6 +32,8 @@ LAUNCHD = /Library/LaunchDaemons
|
||||
PLIST = org.$(NAME).server.plist
|
||||
NET_SRV = /boot/common/settings/network/services
|
||||
SYSTEMD = /lib/systemd/system
|
||||
SYSCONF = /etc/sysconfig
|
||||
DEFAULT = /etc/default
|
||||
|
||||
DIST = $(PACKAGE)-$(VERSION)
|
||||
TGZ = $(DIST).tar.gz
|
||||
@ -216,6 +218,12 @@ install-haiku:
|
||||
|
||||
install-systemd:
|
||||
if [ -d "$(SYSTEMD)" -a ! -f "$(SYSTEMD)/$(NAME).socket" ]; then \
|
||||
if [ -d "$(SYSCONF)" -a ! -f "$(SYSCONF)/$(NAME)" ]; then \
|
||||
$(INSTALL) -m 644 $(NAME).env $(SYSCONF)/$(NAME); \
|
||||
fi; \
|
||||
if [ ! -d "$(SYSCONF)" -a -d "$(DEFAULT)" -a ! -f $(DEFAULT)/$(NAME) ]; then \
|
||||
$(INSTALL) -m 644 $(NAME).env $(DEFAULT)/$(NAME); \
|
||||
fi; \
|
||||
$(INSTALL) -m 644 $(NAME).socket $(NAME)\@.service $(SYSTEMD); \
|
||||
systemctl daemon-reload; \
|
||||
systemctl enable $(NAME).socket; \
|
||||
@ -253,7 +261,7 @@ uninstall-systemd:
|
||||
if [ -d "$(SYSTEMD)" -a -f "$(SYSTEMD)/$(NAME).socket" ]; then \
|
||||
systemctl stop $(NAME).socket; \
|
||||
systemctl disable $(NAME).socket; \
|
||||
rm -f $(SYSTEMD)/$(NAME).socket $(SYSTEMD)/$(NAME)\@.service; \
|
||||
rm -f $(SYSTEMD)/$(NAME).socket $(SYSTEMD)/$(NAME)\@.service $(SYSCONF)/$(NAME) $(DEFAULT)/$(NAME); \
|
||||
fi
|
||||
@echo
|
||||
|
||||
|
@ -18,15 +18,15 @@ directory and replace this page.
|
||||
# Real-time configuration output (WOO!)
|
||||
#
|
||||
Generic information:
|
||||
=echo " current time...: `date`"
|
||||
=echo " your ip address: $REMOTE_ADDR"
|
||||
=echo " server uptime..: `uptime | sed 's/.*up \([^,]*\), .*/\1/' `"
|
||||
=echo " server time....: `date`"
|
||||
=echo " server uptime..: `uptime | sed 's/.*up *\([^,]*\), .*/\1/'`"
|
||||
=echo " server version.: $SERVER_VERSION"
|
||||
=echo " server platform: $SERVER_ARCH"
|
||||
=echo " description....: $SERVER_DESCRIPTION"
|
||||
|
||||
Server configuration:
|
||||
=echo " config file....: `for FILE in /Library/LaunchDaemons/org.gophernicus.server.plist /boot/common/settings/network/services /lib/systemd/system/gophernicus\@.service /etc/xinetd.d/gophernicus /etc/inetd.conf; do if [ -f $FILE ]; then echo $FILE; break; fi; done`"
|
||||
=echo " config file....: `for FILE in /etc/sysconfig/gophernicus /etc/default/gophernicus /Library/LaunchDaemons/org.gophernicus.server.plist /boot/common/settings/network/services /lib/systemd/system/gophernicus\@.service /etc/xinetd.d/gophernicus /etc/inetd.conf; do if [ -f $FILE ]; then echo $FILE; break; fi; done`"
|
||||
=echo " server hostname: $SERVER_HOST"
|
||||
=echo " root directory.: $DOCUMENT_ROOT"
|
||||
=echo " running as user: `whoami`"
|
||||
|
10
gophernicus.env
Normal file
10
gophernicus.env
Normal file
@ -0,0 +1,10 @@
|
||||
# Options for Gophernicus
|
||||
#
|
||||
# See README or run "in.gophernicus -?" to see a full list of
|
||||
# configuration options.
|
||||
#
|
||||
# Example:
|
||||
# OPTIONS="-h full.hostname -D \"I find your lack of gopher disturbing.\""
|
||||
#
|
||||
# Uncomment and add your options here:
|
||||
#OPTIONS=""
|
@ -2,6 +2,8 @@
|
||||
Description=Gophernicus gopher server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/in.gophernicus -h %H
|
||||
EnvironmentFile=-/etc/default/gophernicus
|
||||
EnvironmentFile=-/etc/sysconfig/gophernicus
|
||||
ExecStart=/usr/sbin/in.gophernicus -h %H $OPTIONS
|
||||
StandardInput=socket
|
||||
User=nobody
|
||||
|
Loading…
Reference in New Issue
Block a user