2024-01-27 11:20:40 +01:00
|
|
|
|
2024-01-30 19:41:10 +01:00
|
|
|
.PHONY: release dev deps install skel
|
2024-01-30 16:45:03 +01:00
|
|
|
|
2024-01-27 11:20:40 +01:00
|
|
|
release: deps
|
2024-01-28 15:31:58 +01:00
|
|
|
CGO_ENABLED=1 go build -buildvcs=true .
|
2024-01-27 11:20:40 +01:00
|
|
|
|
|
|
|
dev:
|
|
|
|
go build .
|
|
|
|
./podterminal
|
|
|
|
|
|
|
|
deps:
|
|
|
|
go mod download
|
|
|
|
go mod tidy
|
|
|
|
|
2024-01-28 15:31:58 +01:00
|
|
|
install:
|
2024-01-29 09:30:22 +01:00
|
|
|
cp podterminal /usr/local/bin/podterminal
|
2024-01-30 16:45:03 +01:00
|
|
|
ifeq ($(shell id podterminal 2>/dev/null))
|
2024-01-28 15:31:58 +01:00
|
|
|
useradd -r -s /bin/false podterminal
|
2024-01-30 16:45:03 +01:00
|
|
|
endif
|
|
|
|
mkdir -p /etc/podterminal/skel
|
|
|
|
cp -n ./exampleconfig.yaml /etc/podterminal/config.yaml
|
|
|
|
cp -n podterminal.service /etc/systemd/system/
|
2024-01-29 09:30:22 +01:00
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable --now podterminal
|
2024-01-30 19:41:10 +01:00
|
|
|
|
|
|
|
skel:
|
|
|
|
echo "Taring up /etc/podterminal/skel/"
|
|
|
|
tar -czvf /etc/podterminal/skel.tar.gz -C /etc/podterminal/skel .
|