-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
38 lines (33 loc) · 1.19 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
34
35
36
37
38
build:
cargo build
build-release:
cargo build --release
run: build
source /etc/cloudflare-dyndns/cloudflare-dyndns.config; \
export CLOUDFLARE_APIKEY; \
export CLOUDFLARE_EMAIL; \
export CLOUDFLARE_RECORDS; \
cargo run
run-release:
source /etc/cloudflare-dyndns/cloudflare-dyndns.config; \
export CLOUDFLARE_APIKEY; \
export CLOUDFLARE_EMAIL; \
export CLOUDFLARE_RECORDS; \
cargo run --release
install-systemd: build-release
sudo mkdir -p /etc/cloudflare-dyndns
sudo cp systemd/cloudflare-dyndns.config /etc/cloudflare-dyndns/
sudo cp systemd/cloudflare-dyndns.service /etc/systemd/system/
sudo cp systemd/cloudflare-dyndns.timer /etc/systemd/system/
sudo systemctl enable cloudflare-dyndns.service
sudo systemctl enable cloudflare-dyndns.timer
sudo systemctl start cloudflare-dyndns.service
sudo systemctl start cloudflare-dyndns.timer
uninstall-systemd:
sudo systemctl stop cloudflare-dyndns.service
sudo systemctl stop cloudflare-dyndns.timer
sudo systemctl disable cloudflare-dyndns.service
sudo systemctl disable cloudflare-dyndns.timer
sudo rm /etc/systemd/system/cloudflare-dyndns.service
sudo rm /etc/systemd/system/cloudflare-dyndns.timer
sudo rm -r /etc/cloudflare-dyndns