X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=104907e67c76f2d4df1f737ff986a3300d9db381;hb=989554cab0d0c59d1aab20496ba9550acd17e6e6;hp=6f3eb8be604d875b422f0aed1739b11bc4fbd3df;hpb=8de1e14e35d0ad62620a59f6e2ca4ba19ddcda3c;p=distro-setup diff --git a/brc2 b/brc2 index 6f3eb8b..104907e 100644 --- a/brc2 +++ b/brc2 @@ -2882,8 +2882,8 @@ EOF tmpf=$(mktemp) { printf "%s" "Host * " - sed -n '/^Host /h;/^IdentityFile .*\/home/{g;s/^Host//;s/ / !/gp}' /p/c/subdir_files/.ssh/config-static | tr '\n' ' ' - echo + sed -n '/^Host /h;/^IdentityFile .*\/home/{g;s/^Host//;s/ / !/gp}' /p/c/subdir_files/.ssh/config-static | tr '\n' ' ' \ + | sed -r 's/ *$/\n/' echo "IdentityFile ~/.ssh/work" } >$tmpf cedit -e work-identity /p/c/subdir_files/.ssh/config-static <$tmpf @@ -4750,9 +4750,24 @@ ftoc() { units "tempF($1)" tempC } -# note: requires dns setup of live.iankelling.org, & if i'm home, port -# forwarding in wrt-setup-local. todo: automate that. -local-icecast() { +# local icecast +localic() { + local mod=false + cedit live /p/c/machine_specific/vps/filesystem/var/lib/bind/db.iankelling.org <<'EOF' || mod=true +live CNAME b8.nz. +EOF + if $mod; then + ip=$(ip r show default | sed -r 's/.*src ([^ ]*).*/\1/' | head -n1) + if [[ ! $ip ]] && timeout 1 ping -c 1 $ip; then + echo "error: failed to get ip: $ip" >&2 + exit 1 + fi + cat >/p/c/cmc-firewall-data-http < AuthType Basic @@ -4768,8 +4783,23 @@ AuthName "basic_auth" AuthUserFile "/etc/icecast-fsf-tech-htpasswd" Require valid-user +EOF + s cat /etc/letsencrypt/live/live.iankelling.org/{fullchain,privkey}.pem | s dd of=/etc/icecast2/fullchainpluskey.pem + ser start icecast2 +} +# li icecast +liic() { + cedit live /p/c/machine_specific/vps/filesystem/var/lib/bind/db.iankelling.org <<'EOF' || bindpush +live A 72.14.176.105 + AAAA 2600:3c00::f03c:91ff:fe6d:baf8 EOF } +# icecast rm -r +icrmr() { + find /var/icecast -type f -delete + ssh li.b8.nz find /var/icecast -type f -delete +} + # obs screen switching of obof() {