# SPDX-License-Identifier: GPL-3.0-or-later
-# shellcheck source=/a/bin/ds/.bashrc
-export LC_USEBASHRC=t; if [[ -s ~/.bashrc ]]; then . ~/.bashrc; fi
+# shellcheck source=./brc
+source ~/brc
### setup
source /a/bin/bash-bear-trap/bash-bear
done
if $doupdate; then
tmpdir=$(mktemp -d)
- cd $tmpdir
- # cant apt get the keyring without doing an update, can't update
- # without the keyring, this is a stupid chicken and egg problem
- # that apt should have some feature to solve, but doesn't as far
- # as I know.
- f=debian-archive-keyring_2023.3+deb12u1_all.deb
- wget http://ftp.debian.org/debian/pool/main/d/debian-archive-keyring/$f
- sudo dpkg -i $f
+ (
+ cd $tmpdir
+ # cant apt get the keyring without doing an update, can't update
+ # without the keyring, this is a stupid chicken and egg problem
+ # that apt should have some feature to solve, but doesn't as far
+ # as I know.
+ f=debian-archive-keyring_2023.3+deb12u1_all.deb
+ wget http://ftp.debian.org/debian/pool/main/d/debian-archive-keyring/$f
+ sudo dpkg -i $f
+ )
p update
- cd -
rm -rf $tmpdir
fi
client-to-client
EOF
-
- ngset
- files=(/etc/openvpn/client-config-hole/*)
- if (( ${#files[@]} >= 1 )); then
- rm -f ${files[@]}
- fi
- ngreset
- for host in ${!vpn_ips[@]}; do
- sd /etc/openvpn/client-config-hole/$host <<EOF
-ifconfig-push 10.5.5.${vpn_ips[$host]} 255.255.255.0
-EOF
- done
+ # note client-config files are setup in brc2 update-host-info
# for adding cert to system with /p