From 280ce28fea55d53a16e4326b6756d5ad7fa93cd1 Mon Sep 17 00:00:00 2001 From: Jon Lundy Date: Mon, 23 Nov 2020 14:55:04 -0700 Subject: [PATCH] fixes to service. add moar footer --- Makefile | 27 ++++++++++++++------------- pkg/keyproofs/template.go | 2 +- sour.is-keyproofs.service | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 7870f0d..8091f0b 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,37 @@ -NAME=sour.is-ipseity +NAME=sour.is-keyproofs BUMP?=current DATE:=$(shell date -u +%FT%TZ) HASH:=$(shell git rev-pars HEAD 2> /dev/null) VERSION:=$(shell BUMP=$(BUMP) ./version.sh) +build: $(NAME) + +clean: + rm -f $(NAME) + version: @echo $(VERSION) - tag: git tag -a v$(VERSION) -m "Version: $(VERSION)" release: @make tag BUMP=patch - run: go run -v \ -ldflags "\ -X main.AppVersion=$(VERSION) \ -X main.BuildHash=$(HASH) \ - -X main.BuildDate=$(DATE) \ - " \ - . + -X main.BuildDate=$(DATE)" . -build: +$(NAME): go build -v \ + -o $(NAME) \ -ldflags "\ -X main.AppVersion=$(VERSION) \ -X main.BuildHash=$(HASH) \ - -X main.BuildDate=$(DATE) \ - " \ - . + -X main.BuildDate=$(DATE)" . -install: build - install ./keyproofs /usr/local/bin - install ./sour.is-keyproofs.service /lib/systemd/system \ No newline at end of file +install: $(NAME) + install ./$(NAME) /usr/local/bin + install ./$(NAME).service /lib/systemd/system + systemctl daemon-reload diff --git a/pkg/keyproofs/template.go b/pkg/keyproofs/template.go index 171531d..f5f4953 100644 --- a/pkg/keyproofs/template.go +++ b/pkg/keyproofs/template.go @@ -173,7 +173,7 @@ var pageTPL = ` diff --git a/sour.is-keyproofs.service b/sour.is-keyproofs.service index 93c444c..285486f 100644 --- a/sour.is-keyproofs.service +++ b/sour.is-keyproofs.service @@ -6,7 +6,7 @@ After=syslog.target network.target Type=simple User=www-data WorkingDirectory=/var/www -ExecStart=/usr/local/bin/keyproofs +ExecStart=/usr/local/bin/sour.is-keyproofs Restart=always RestartSec=30