add install, systemd unit

This commit is contained in:
stryan 2021-10-06 16:37:08 -04:00
parent e090810f17
commit 17f788101b
2 changed files with 20 additions and 0 deletions

View File

@ -12,3 +12,8 @@ tome_ws: $(wildcard *.go)
clean:
rm -f tome_ws
install: tome_ws
install -d $(DESTDIR)$(PREFIX)/bin
install -m 755 tome_ws $(DESTDIR)$(PREFIX)/bin
install -d /usr/lib/systemd/system/
install -m 744 init/tome_ws.service

15
init/guildgate.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=Tomecraft Websocket server
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=3
User=root
ExecStart=/usr/local/bin/tome_ws
[Install]
WantedBy=multi-user.target