diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2024-09-13 14:32:01 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2024-09-13 14:32:01 -0400 |
| commit | 8759523157afb38f8565687ebd0e1f29a1af3e42 (patch) | |
| tree | 4a0227efd995d11730033f13d3d3aa3d80a4ec09 | |
| parent | 00ce2db61bd3ac89450af13a76439515e0ccc577 (diff) | |
Add makefile and service
| -rw-r--r-- | Makefile | 25 | ||||
| -rw-r--r-- | nonsense-time.service | 11 |
2 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..edd4485 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +BIN:= nonsense-time +SERVICE:= nonsense-time.service + +.PHONY: all test clean build install info + +all: build + +build: $(BIN) + +install: $(BIN) + cp $(BIN) /usr/bin + cp + +test: + go test ./... + +clean: + go mod tidy + +info: + @echo "BIN: $(BIN)" + @echo "SERVICE: $(SERVICE)" + +nonsense-time: + go build . diff --git a/nonsense-time.service b/nonsense-time.service new file mode 100644 index 0000000..2bbe9f0 --- /dev/null +++ b/nonsense-time.service @@ -0,0 +1,11 @@ +[Unit] +Description=Nonsense Time backend +After=nginx.service + +[Service] +ExecStart=/usr/bin/nonsense-time +Type=simple +Restart=on-failure + +[Install] +WantedBy=default.target |
