add install, systemd unit
This commit is contained in:
parent
e090810f17
commit
17f788101b
5
Makefile
5
Makefile
@ -12,3 +12,8 @@ tome_ws: $(wildcard *.go)
|
|||||||
clean:
|
clean:
|
||||||
rm -f tome_ws
|
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
15
init/guildgate.service
Normal 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
|
Loading…
Reference in New Issue
Block a user