#20 add systemd stuff for time server

pull/32/head
Geoffrey Merck 4 years ago
parent b237829b95
commit 0161d4879f

@ -17,6 +17,20 @@ install: dgwtimeserver
# copy executable
@cp -f dgwtimeserver $(BIN_DIR)
# copy and adjust config
@cp -fn example.cfg $(CFG_DIR)/dgwtimeserver.cfg
@sed -i "s|path=/var/log/dstargateway/|path=$(LOG_DIR)|g" $(CFG_DIR)/dgwtimeserver.cfg
@sed -i "s|data=/usr/local/share/dstargateway.d/|data=$(DATA_DIR)|g" $(CFG_DIR)/dgwtimeserver.cfg
# SystemD service install
@cp -f ../debian/dgwtimeserver.service /lib/systemd/system/
@sed -i "s|%CFG_DIR%|$(CFG_DIR)|g" /lib/systemd/system/dgwtimeserver.service
systemctl enable dgwtimeserver.service
@systemctl daemon-reload
@echo "\n"
@echo "DGWTimeserver Install complete, edit $(CFG_DIR)dstargateway.cfg and start the daemon with 'systemctl start dgwtimeserver.service'"
@echo "\n"
../BaseCommon/BaseCommon.a:
../DStarBase/DStarBase.a:
../VersionInfo/GitVersion.h:

@ -0,0 +1,13 @@
[Unit]
Description=D-STAR Gateway Daemon
After=network.target,network-online.target
Wants=network-online.target
[Service]
User=dstar
Type=simple
ExecStart=/usr/local/bin/dgwtimeserver %CFG_DIR%/dstargateway.cfg
Restart=on-failure
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save

Powered by TurnKey Linux.