-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcloudflare-ddns.service
More file actions
26 lines (23 loc) · 891 Bytes
/
cloudflare-ddns.service
File metadata and controls
26 lines (23 loc) · 891 Bytes
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
[Unit]
Description=Cloudflare DDNS Service
After=network-online.target
Wants=network-online.target
[Service]
DynamicUser=yes
StateDirectory=cloudflare-ddns
Type=oneshot
Restart=on-failure
RestartSec=30
ExecStart=/bin/bash /usr/local/bin/cloudflare-ddns.sh
Environment="CLOUDFLARE_API_TOKEN=your_api_token_here"
Environment="CLOUDFLARE_RECORD_NAMES=4.example.com,6.example.com,www.example.com"
Environment="CLOUDFLARE_RECORD_TYPES=4,6,both"
Environment="CLOUDFLARE_USER_MAIL=your-email@example.com"
Environment="CLOUDFLARE_ZONE_NAME=example.com"
# Optional Telegram notification (uncomment and modify as needed);
# Environment="TELEGRAM_BOT_ID=123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
# Environment="TELEGRAM_CHAT_ID=-123456789"
# Optional environments (uncomment and modify as needed);
# Environment="OUTBOUND_INTERFACE=eth0"
# Environment="SOCKS_ADDR=[::1]"
# Environment="SOCKS_PORT=1080"