-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
33 lines (29 loc) · 1.09 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
EDITOR ?= vi
.PHONY: default
default: install
.env: example.env
test -f .env || cp example.env .env
chmod 600 .env
"${EDITOR}" .env
.PHONY: install
install: .env
@mkdir -p /etc/netlify-ddns-client
@mkdir -p /etc/systemd/system
@install -m 700 .env /etc/netlify-ddns-client/rc
@install -m 700 netlify-ddns-client.sh /usr/bin/netlify-ddns-client.sh
@install -m 744 netlify-ddns-client.service /etc/systemd/system/netlify-ddns-client.service
@install -m 744 netlify-ddns-client.timer /etc/systemd/system/netlify-ddns-client.timer
@systemctl daemon-reload
@systemctl enable --now netlify-ddns-client.service || true
@systemctl enable --now netlify-ddns-client.timer
@echo "Your netlify-ddns-client configuration is now available at:"
@echo " /etc/netlify-ddns-client/rc"
.PHONY: uninstall
uninstall:
@systemctl disable --now netlify-ddns-client.timer || true
@systemctl disable --now netlify-ddns-client.service || true
@rm -rf \
/etc/netlify-ddns-client \
/etc/systemd/system/netlify-ddns-client.service \
/etc/systemd/system/netlify-ddns-client.timer || true
@systemctl daemon-reload || true