diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..36d89a2 --- /dev/null +++ b/Makefile @@ -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 diff --git a/kas.service b/kas.service new file mode 100644 index 0000000..d6ad05b --- /dev/null +++ b/kas.service @@ -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