add share-link password/expiry, journal touch-ups, ddns helper and audit docs

This commit is contained in:
dev
2026-09-08 10:54:24 +03:00
parent dd5a2ea288
commit 57f2ea4f41
11 changed files with 626 additions and 63 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# dynv6 DDNS update script
# Environment variables expected:
# DYNDNS_TOKEN - dynv6 token
# DYNDNS_HOSTNAME - domain name (e.g., kiberone.dns.army)
set -e
TOKEN="${DYNDNS_TOKEN}"
HOSTNAME="${DYNDNS_HOSTNAME}"
if [ -z "$TOKEN" ] || [ -z "$HOSTNAME" ]; then
echo "ERROR: DYNDNS_TOKEN and DYNDNS_HOSTNAME must be set"
exit 1
fi
echo "[$(date)] Updating dynv6 for $HOSTNAME..."
# Update IPv4
IPV4=$(curl -s -4 https://api.ipify.org 2>/dev/null || echo "")
if [ -n "$IPV4" ]; then
echo "[$(date)] Detected IPv4: $IPV4"
RESPONSE=$(curl -s "https://dynv6.com/api/update?hostname=${HOSTNAME}&token=${TOKEN}&ipv4=${IPV4}")
echo "[$(date)] IPv4 update response: $RESPONSE"
else
echo "[$(date)] No IPv4 detected"
fi
# Update IPv6
IPV6=$(curl -s -6 https://api6.ipify.org 2>/dev/null || echo "")
if [ -n "$IPV6" ]; then
echo "[$(date)] Detected IPv6: $IPV6"
RESPONSE=$(curl -s "https://dynv6.com/api/update?hostname=${HOSTNAME}&token=${TOKEN}&ipv6=${IPV6}")
echo "[$(date)] IPv6 update response: $RESPONSE"
else
echo "[$(date)] No IPv6 detected"
fi
echo "[$(date)] Update complete"