feat: WAN IP Guard - dynamic DNS updater with WhatsApp notifications
Checks public WAN IP every 5 minutes via systemd timer. On change: - Updates A-records via DirectAdmin API (login key auth) - Sends WhatsApp notification via wwebjs-api
This commit is contained in:
commit
c4c80e98af
9 changed files with 461 additions and 0 deletions
12
systemd/wan-ip-guard.service
Normal file
12
systemd/wan-ip-guard.service
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=WAN IP Guard - Dynamic DNS updater
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
# Change 'your-user' and paths to match your setup
|
||||
User=your-user
|
||||
EnvironmentFile=/home/your-user/wan-ip-guard/.env
|
||||
WorkingDirectory=/home/your-user/wan-ip-guard
|
||||
ExecStart=/usr/bin/node /home/your-user/wan-ip-guard/index.js
|
||||
11
systemd/wan-ip-guard.timer
Normal file
11
systemd/wan-ip-guard.timer
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Run WAN IP Guard every 5 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1min
|
||||
OnUnitActiveSec=5min
|
||||
AccuracySec=30s
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Reference in a new issue