Added Service and Packager

This commit is contained in:
Brian Buller 2019-11-12 18:57:25 -06:00
parent ac3783e47b
commit 0bbab771ce
3 changed files with 25 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
cmd/plugins/* cmd/plugins/*
cmd/helperbot cmd/helperbot
cmd/*.db cmd/*.db
helperbot.tgz

16
cmd/helperbot.service Executable file
View File

@ -0,0 +1,16 @@
[Unit]
Description=
After=syslog.target
After=network.target
[Service]
Type=simple
User=brbuller
Group=brbuller
WorkingDirectory=/home/brbuller/helperbot/
ExecStart=/home/brbuller/helperbot/helperbot
Restart=always
Environment="HOME=/home/brbuller/helperbot","USER=brbuller"
[Install]
WantedBy=multi-user.target

8
package.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
rm helperbot.tgz
./buildplugins.sh
cd cmd
go build -o helperbot
tar -zcvf ../helperbot.tgz helperbot* plugins
cd ..