dotfiles/.bin/selfhost-update.sh

14 lines
374 B
Bash
Raw Normal View History

#!/bin/sh
# Selfhost DynDns Update
# Usage:
# IPv4 Update: selfhost-update.sh
# IPv6 Update: selfhost-update.sh -6
# Note, min 30 seconds between calls! (rate limit)
ID=$(pass Internet/selfhost.de | grep DynDnsUser | cut -d" " -f2)
PW=$(pass Internet/selfhost.de | grep DynDnsPass | cut -d" " -f2)
set -x
curl $1 "https://$ID:$PW@carol.selfhost.de/nic/update?textmodi=1"