tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-10-19 22:24:23 +03:00
parent 200af2c33b
commit d27f8e762d

View File

@ -104,23 +104,20 @@ fi
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Tools # System...
if xreadYes "# Update system?" UPDATE ; then if xreadYes "# Update system?" UPDATE ; then
@ apt update @ apt update
@ apt upgrade @ apt upgrade
fi fi
# Tools...
if xreadYes "# Install additional apps?" APPS ; then if xreadYes "# Install additional apps?" APPS ; then
@ apt install ${SOFTWARE[@]} @ apt install ${SOFTWARE[@]}
fi fi
# Bridges... # Bridges...
# XXX need to:
# - bootstrap this
# - setup the gate, ssh, and wireguard
# - inalize
# XXX /etc/hosts
# XXX save config???
# XXX should we do things in ./staging ???
if xreadYes "# Create bridges?" BRIDGES ; then if xreadYes "# Create bridges?" BRIDGES ; then
xread "WAN port: " WAN_PORT xread "WAN port: " WAN_PORT
xread "ADMIN port: " ADMIN_PORT xread "ADMIN port: " ADMIN_PORT
@ -214,10 +211,6 @@ if xreadYes "# Create bridges?" BRIDGES ; then
fi fi
echo "# Building config templates..."
buildAssets
# /etc/hosts # /etc/hosts
if xreadYes "# Update /etc/hosts?" HOSTS ; then if xreadYes "# Update /etc/hosts?" HOSTS ; then
@ cp /etc/hosts{,.bak} @ cp /etc/hosts{,.bak}
@ -229,8 +222,19 @@ if xreadYes "# Update /etc/hosts?" HOSTS ; then
fi fi
# build only if we need to...
build(){
if [ -z $__ASSETS ] ; then
__ASSETS=1
echo "# Building config templates..."
buildAssets
fi
}
# DNS # DNS
if xreadYes "# Update DNS?" DNS ; then if xreadYes "# Update DNS?" DNS ; then
build
file=/etc/resolv.conf file=/etc/resolv.conf
@ cp "staging/${file}" "${file}".new @ cp "staging/${file}" "${file}".new
reviewApplyChanges "${file}" reviewApplyChanges "${file}"
@ -239,6 +243,7 @@ fi
# Firewall # Firewall
if xreadYes "# Update firewall rules?" FIREWALL ; then if xreadYes "# Update firewall rules?" FIREWALL ; then
build
file=/etc/pve/firewall/cluster.fw file=/etc/pve/firewall/cluster.fw
@ cp "staging/${file}" "${file}".new @ cp "staging/${file}" "${file}".new
reviewApplyChanges "${file}" reviewApplyChanges "${file}"