mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-20 18:41:47 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a0b7e2c9d1
commit
c898c0c874
26
.pct-helpers
26
.pct-helpers
@ -371,6 +371,8 @@ webAppConfig(){
|
|||||||
|
|
||||||
#
|
#
|
||||||
# readVars
|
# readVars
|
||||||
|
# readCTHardwareVars
|
||||||
|
# readBridgeVars
|
||||||
#
|
#
|
||||||
# Variables this handles:
|
# Variables this handles:
|
||||||
# EMAIL
|
# EMAIL
|
||||||
@ -396,22 +398,28 @@ 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
|
||||||
|
|
||||||
# hardware...
|
readCTHardwareVars
|
||||||
xread "CPU cores: " CORES
|
|
||||||
xread "RAM (MB): " RAM
|
|
||||||
xread "SWAP (MB): " SWAP
|
|
||||||
xread "DRIVE (GB): " DRIVE
|
|
||||||
|
|
||||||
# bridge config...
|
readBridgeVars
|
||||||
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:
|
||||||
|
|||||||
@ -1,20 +1,20 @@
|
|||||||
|
|
||||||
auto vmbr0
|
auto vmbr${LAN_BRIDGE}
|
||||||
iface vmbr0 inet manual
|
iface vmbr${LAN_BRIDGE} inet manual
|
||||||
bridge-ports none
|
bridge-ports none
|
||||||
bridge-stp off
|
bridge-stp off
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#LAN
|
#LAN
|
||||||
|
|
||||||
auto vmbr1
|
auto vmbr${WAN_BRIDGE}
|
||||||
iface vmbr2 inet manual
|
iface vmbr${WAN_BRIDGE} inet manual
|
||||||
bridge-ports ${WAN_PORT}
|
bridge-ports ${WAN_PORT}
|
||||||
bridge-stp off
|
bridge-stp off
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
#WAN
|
#WAN
|
||||||
|
|
||||||
auto vmbr2
|
auto vmbr${ADMIN_BRIDGE}
|
||||||
iface vmbr3 inet static
|
iface vmbr${ADMIN_BRIDGE} inet static
|
||||||
address ${HOST_ADMIN_IP}
|
address ${HOST_ADMIN_IP}
|
||||||
gateway ${GATE_ADMIN_IPn}
|
gateway ${GATE_ADMIN_IPn}
|
||||||
bridge-ports ${ADMIN_PORT}
|
bridge-ports ${ADMIN_PORT}
|
||||||
|
|||||||
11
host/make.sh
11
host/make.sh
@ -37,6 +37,10 @@ SOFTWARE=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# XXX
|
||||||
|
#readVars
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
@ -54,22 +58,25 @@ fi
|
|||||||
# - setup the gate, ssh, and wireguard
|
# - setup the gate, ssh, and wireguard
|
||||||
# - inalize
|
# - inalize
|
||||||
# XXX /etc/hosts
|
# XXX /etc/hosts
|
||||||
|
# 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
|
||||||
xread "Host ADMIN IP: " HOST_ADMIN_IP
|
xread "Host ADMIN IP: " HOST_ADMIN_IP
|
||||||
xread "Gate ADMIN IP: " GATE_ADMIN_IP
|
xread "Gate ADMIN IP: " GATE_ADMIN_IP
|
||||||
|
readBridgeVars
|
||||||
|
|
||||||
|
@ cp /etc/network/interfaces{,.new}
|
||||||
|
|
||||||
BRIDGES="${\
|
BRIDGES="${\
|
||||||
cat bridges.tpl \
|
cat bridges.tpl \
|
||||||
| expandPCTTemplate WAN_PORT ADMIN_PORT}"
|
| expandPCTTemplate WAN_PORT ADMIN_PORT}"
|
||||||
|
|
||||||
@ cp /etc/network/interfaces{,.new}
|
|
||||||
|
|
||||||
# XXX add $BRIDGES to /etc/network/interfaces either before the
|
# XXX add $BRIDGES to /etc/network/interfaces either before the
|
||||||
# source command or at the end...
|
# source command or at the end...
|
||||||
# XXX
|
# XXX
|
||||||
|
|
||||||
|
# review/apply setup...
|
||||||
echo "# Review updated: /etc/network/interfaces.new:"
|
echo "# Review updated: /etc/network/interfaces.new:"
|
||||||
@ cat /etc/network/interfaces.new
|
@ cat /etc/network/interfaces.new
|
||||||
echo
|
echo
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user