diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1eb88d5 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +all: install + +clean: + rm -rf gohookr + +install: + go mod tidy + go build -o gohookr + cp gohookr /usr/local/bin/ + cp gohookr.service /usr/lib/systemd/system/ + cp config.json /etc/gohookr.json + systemctl daemon-reload + systemctl enable --now gohookr + +uninstall: + systemctl disable --now gohookr + rm -rf /usr/local/bin/gohookr /usr/lib/systemd/system/gohookr.service + systemctl daemon-reload diff --git a/readme.md b/readme.md index fbce155..54e0d6f 100644 --- a/readme.md +++ b/readme.md @@ -12,12 +12,7 @@ Check below for an example configuration. After you [install go](https://golang.org/doc/install): ``` -go mod tidy -go build -cp gohookr /usr/local/bin/ -cp gohookr.service /usr/lib/systemd/system/ -systemctl daemon-reload -systemctl enable --now gohookr +make ``` ## Signature Verification