Compare commits

..

No commits in common. "9eda8afb6c054de904f46715ad22f151cd8e137b" and "3f0e00b8213af297d02b11980f40922451f9e945" have entirely different histories.

4 changed files with 12 additions and 94 deletions

View File

@ -371,8 +371,6 @@ webAppConfig(){
#
# readVars
# readCTHardwareVars
# readBridgeVars
#
# Variables this handles:
# EMAIL
@ -398,28 +396,22 @@ webAppConfig(){
# TMP_PASS_LEN
# ROOTPASS
#
readCTHardwareVars(){
# hardware...
xread "CPU cores: " CORES
xread "RAM (MB): " RAM
xread "SWAP (MB): " SWAP
xread "DRIVE (GB): " DRIVE
}
readBridgeVars(){
# bridge config...
xread "WAN bridge: vmbr" WAN_BRIDGE
xread "LAN bridge: vmbr" LAN_BRIDGE
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
}
readVars(){
xread -n "Email: " EMAIL
xread -n "Domain: " DOMAIN
xread "ID: " ID
xread "Hostname: " CTHOSTNAME
readCTHardwareVars
# hardware...
xread "CPU cores: " CORES
xread "RAM (MB): " RAM
xread "SWAP (MB): " SWAP
xread "DRIVE (GB): " DRIVE
readBridgeVars
# bridge config...
xread "WAN bridge: vmbr" WAN_BRIDGE
xread "LAN bridge: vmbr" LAN_BRIDGE
xread "ADMIN bridge: vmbr" ADMIN_BRIDGE
# gateway...
# IPs can be:
@ -481,11 +473,10 @@ PCT_TEMPLATE_VARS=(
EMAIL
DOMAIN
CTHOSTNAME
HOST_ADMIN_IP
GATE_HOSTNAME
NS_HOSTNAME
GATE_LAN_IP
GATE_ADMIN_IP
NS_HOSTNAME
NS_LAN_IP
NS_ADMIN_IP
WAN_IP
@ -541,8 +532,8 @@ expandTemplate(){
#
# expandPCTTemplate PATH [VAR ...]
# .. | expandPCTTemplate [VAR ...]
# expandTemplate PATH [VAR ...]
# .. | expandTemplate [VAR ...]
#
expandPCTTemplate(){
local input=

View File

@ -85,9 +85,6 @@ DFL_PCT_EXTRA=SKIP
# can be left as-is.
#
# host
HOST_ADMIN_IP=10.0.0.245/24
# Nameserver
NS_HOSTNAME=ns
NS_ID=100

View File

@ -1,24 +0,0 @@
auto vmbr${LAN_BRIDGE}
iface vmbr${LAN_BRIDGE} inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
#LAN
auto vmbr${WAN_BRIDGE}
iface vmbr${WAN_BRIDGE} inet manual
bridge-ports ${WAN_PORT}
bridge-stp off
bridge-fd 0
#WAN
auto vmbr${ADMIN_BRIDGE}
iface vmbr${ADMIN_BRIDGE} inet static
address ${HOST_ADMIN_IP}
gateway ${GATE_ADMIN_IPn}
bridge-ports ${ADMIN_PORT}
bridge-stp off
bridge-fd 0
#ADMIN

View File

@ -10,24 +10,12 @@ PATH=$PATH:$(dirname "$(pwd)")
source ../.pct-helpers
#----------------------------------------------------------------------
need ifreload
#----------------------------------------------------------------------
readConfig
DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0}
DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0}
DFL_HOST_ADMIN_IP=${PROXMOX_ADMIN_IP:-10.0.0.254/24}
SOFTWARE=(
ifupdown2
make
w3m links
tree
@ -37,10 +25,6 @@ SOFTWARE=(
)
# XXX
#readVars
#----------------------------------------------------------------------
# Tools
@ -53,38 +37,8 @@ if xreadYes "# Install additional apps?" APPS ; then
fi
# Networking
# 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
xread "WAN port: " WAN_PORT
xread "ADMIN port: " ADMIN_PORT
xread "Host ADMIN IP: " HOST_ADMIN_IP
xread "Gate ADMIN IP: " GATE_ADMIN_IP
readBridgeVars
@ cp /etc/network/interfaces{,.new}
BRIDGES="${\
cat bridges.tpl \
| expandPCTTemplate WAN_PORT ADMIN_PORT}"
# XXX add $BRIDGES to /etc/network/interfaces either before the
# source command or at the end...
# XXX
# review/apply setup...
echo "# Review updated: /etc/network/interfaces.new:"
@ cat /etc/network/interfaces.new
echo
if xreadYes "# Apply changes?" ; then
@ mv -b /etc/network/interfaces{.new,}
@ ifreload -a
fi
fi
# Firewall