Create Makefile

This commit is contained in:
Akbar Rahman 2021-08-04 10:22:19 +01:00
parent 294bd80cc7
commit a2d4153c64
2 changed files with 19 additions and 6 deletions

18
Makefile Normal file
View File

@ -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

View File

@ -12,12 +12,7 @@ Check below for an example configuration.
After you [install go](https://golang.org/doc/install): After you [install go](https://golang.org/doc/install):
``` ```
go mod tidy make
go build
cp gohookr /usr/local/bin/
cp gohookr.service /usr/lib/systemd/system/
systemctl daemon-reload
systemctl enable --now gohookr
``` ```
## Signature Verification ## Signature Verification