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 # readVars
# readCTHardwareVars
# readBridgeVars
# #
# Variables this handles: # Variables this handles:
# EMAIL # EMAIL
@ -398,28 +396,22 @@ webAppConfig(){
# TMP_PASS_LEN # TMP_PASS_LEN
# ROOTPASS # 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(){ readVars(){
xread -n "Email: " EMAIL xread -n "Email: " EMAIL
xread -n "Domain: " DOMAIN xread -n "Domain: " DOMAIN
xread "ID: " ID xread "ID: " ID
xread "Hostname: " CTHOSTNAME 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... # gateway...
# IPs can be: # IPs can be:
@ -481,11 +473,10 @@ PCT_TEMPLATE_VARS=(
EMAIL EMAIL
DOMAIN DOMAIN
CTHOSTNAME CTHOSTNAME
HOST_ADMIN_IP
GATE_HOSTNAME GATE_HOSTNAME
NS_HOSTNAME
GATE_LAN_IP GATE_LAN_IP
GATE_ADMIN_IP GATE_ADMIN_IP
NS_HOSTNAME
NS_LAN_IP NS_LAN_IP
NS_ADMIN_IP NS_ADMIN_IP
WAN_IP WAN_IP
@ -541,8 +532,8 @@ expandTemplate(){
# #
# expandPCTTemplate PATH [VAR ...] # expandTemplate PATH [VAR ...]
# .. | expandPCTTemplate [VAR ...] # .. | expandTemplate [VAR ...]
# #
expandPCTTemplate(){ expandPCTTemplate(){
local input= local input=

View File

@ -85,9 +85,6 @@ DFL_PCT_EXTRA=SKIP
# can be left as-is. # can be left as-is.
# #
# host
HOST_ADMIN_IP=10.0.0.245/24
# Nameserver # Nameserver
NS_HOSTNAME=ns NS_HOSTNAME=ns
NS_ID=100 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 source ../.pct-helpers
#----------------------------------------------------------------------
need ifreload
#---------------------------------------------------------------------- #----------------------------------------------------------------------
readConfig 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=( SOFTWARE=(
ifupdown2
make make
w3m links w3m links
tree tree
@ -37,10 +25,6 @@ SOFTWARE=(
) )
# XXX
#readVars
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Tools # Tools
@ -53,38 +37,8 @@ if xreadYes "# Install additional apps?" APPS ; then
fi fi
# Networking # 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 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 echo
if xreadYes "# Apply changes?" ; then
@ mv -b /etc/network/interfaces{.new,}
@ ifreload -a
fi
fi fi
# Firewall # Firewall