Add Makefile and systemd unit file.
This commit is contained in:
16
Makefile
Normal file
16
Makefile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
all:
|
||||||
|
|
||||||
|
update: refresh install
|
||||||
|
sudo systemctl restart kas.service
|
||||||
|
|
||||||
|
refresh:
|
||||||
|
git pull --rebase
|
||||||
|
|
||||||
|
install:
|
||||||
|
go build .
|
||||||
|
sudo mv kas /usr/local/bin/kas
|
||||||
|
|
||||||
|
setup:
|
||||||
|
sudo install -m 0644 kas.service /etc/systemd/system/kas.service
|
||||||
|
sudo install -d 0700 /etc/kas
|
||||||
|
sudo install -m 0600 kas.yaml /etc/kas/kas.yaml
|
||||||
10
kas.service
Normal file
10
kas.service
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
After=network.target
|
||||||
|
Description=Kyle's Agent System
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecPre=test -f /etc/kas/kas.yaml
|
||||||
|
ExecStart=/usr/local/bin/kas -f /etc/kas/kas.yaml
|
||||||
|
Restart=on-failure
|
||||||
|
Group=daemon
|
||||||
|
User=daemon
|
||||||
Reference in New Issue
Block a user