commit
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Timofey.Kovalev 2021-06-11 16:10:49 +03:00
parent f863aef62d
commit 0ebf053a91
3 changed files with 20 additions and 2 deletions

View File

@ -15,3 +15,7 @@ steps:
- name: install
commands:
- make install
- name: restart
commands:
- systemctl craft-bot restart

12
craft-bot.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=the telegram bot for minecraft
After=network.target
Wants=network-online.target
[Service]
Restart=always
Type=simple
ExecStart=/usr/local/craft-bot/craft-bot -c /etc/craft-bot/craft-bot.cfg
[Install]
WantedBy=multi-user.target

View File

@ -10,3 +10,5 @@ build/craft-bot: *.go
install: build
mkdir -p /usr/local/craft-bot
install build/craft-bot /usr/local/craft-bot/
install craft-bot.service /etc/systemd/system/craft-bot.service
systemctl daemon-reload