tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-07 16:34:47 +03:00
parent 3c1fd7123c
commit f45338142f
6 changed files with 14 additions and 1 deletions

View File

@ -148,6 +148,8 @@ normpath(){
# https://pve.proxmox.com/wiki/Linux_Container
getLatestTemplate(){
#IFS=$'\n'
@ pveam update
local templates=($(pveam available | grep -o ''${1}'.*$'))
local latest=${templates[-1]}
@ -243,6 +245,7 @@ readVars(){
xread "Hostname: " CTHOSTNAME
# hardware...
xread "CPU cores: " CORES
xread "RAM (MB): " RAM
xread "SWAP (MB): " SWAP
xread "DRIVE (GB): " DRIVE

View File

@ -20,6 +20,7 @@ readConfig
DFL_ID=${DFL_ID:=101}
DFL_CTHOSTNAME=${GATE_HOSTNAME:=${DFL_CTHOSTNAME:=gate}}
CORES=1
RAM=128
SWAP=$RAM
DRIVE=0.5
@ -41,6 +42,7 @@ readVars
OPTS_STAGE_1="\
--hostname $CTHOSTNAME \
--cores $CORES \
--memory $RAM \
--swap $SWAP \
--net0 name=wan,bridge=vmbr${WAN_BRIDGE},firewall=1${WAN_GATE:+,gw=${WAN_GATE}}${WAN_IP:+,ip=${WAN_IP}},type=veth \

View File

@ -20,6 +20,7 @@ readConfig
DFL_ID=${DFL_ID:=300}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=nextcloud}
DFL_CORES=${DFL_CORES:=2}
DFL_RAM=${DFL_RAM:=2048}
DFL_SWAP=${DFL_SWAP:=${DFL_RAM:=2048}}
DFL_DRIVE=${DFL_DRIVE:=40}
@ -40,8 +41,8 @@ readVars
# XXX cores...
OPTS_STAGE_1="\
--cores 2 \
--hostname $CTHOSTNAME \
--cores $CORES \
--memory $RAM \
--swap $SWAP \
--net0 name=lan,bridge=vmbr${LAN_BRIDGE},firewall=1,ip=dhcp,type=veth \
@ -65,6 +66,7 @@ buildAssets "$TEMPLATE_DIR" "$ASSETS_DIR"
echo "# Creating CT..."
getLatestTemplate '.*-turnkey-nextcloud' TEMPLATE
pctCreate $ID "$TEMPLATE" "$OPTS_STAGE_1" "$PASS"
sleep ${TIMEOUT:=5}
echo "# Starting TKL Setup (this may take a few minutes to start)..."
@ lxc-attach $ID -- bash --login -c exit

View File

@ -20,6 +20,7 @@ readConfig
DFL_ID=${DFL_ID:=100}
DFL_CTHOSTNAME=${NS_HOSTNAME:=${DFL_CTHOSTNAME:=ns}}
CORES=1
RAM=128
SWAP=$RAM
DRIVE=0.5
@ -41,6 +42,7 @@ readVars
OPTS_STAGE_1="\
--hostname $CTHOSTNAME \
--cores $CORES \
--memory $RAM \
--swap $SWAP \
--net0 name=lan,bridge=vmbr${LAN_BRIDGE},firewall=1${LAN_GATE:+,gw=$LAN_GATE}${LAN_IP:+,ip=$LAN_IP},type=veth \

View File

@ -20,6 +20,7 @@ readConfig
DFL_ID=${DFL_ID:=102}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=ssh}
DFL_CORES=${DFL_CORES:=1}
DFL_RAM=${DFL_RAM:=1024}
DFL_SWAP=${DFL_SWAP:=${DFL_RAM:=1024}}
DFL_DRIVE=${DFL_DRIVE:=16}
@ -41,6 +42,7 @@ readVars
OPTS_STAGE_1="\
--hostname $CTHOSTNAME \
--cores $CORES \
--memory $RAM \
--swap $SWAP \
--net0 name=lan,bridge=vmbr${LAN_BRIDGE},firewall=1,ip=dhcp,type=veth \

View File

@ -20,6 +20,7 @@ readConfig
DFL_ID=${DFL_ID:=301}
DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=syncthing}
DFL_CORES=${DFL_CORES:=1}
DFL_RAM=${DFL_RAM:=1024}
DFL_SWAP=${DFL_SWAP:=${DFL_RAM:=1024}}
DFL_DRIVE=${DFL_DRIVE:=8}
@ -40,6 +41,7 @@ readVars
OPTS_STAGE_1="\
--hostname $CTHOSTNAME \
--cores $CORES \
--memory $RAM \
--swap $SWAP \
--net0 name=lan,bridge=vmbr${LAN_BRIDGE},firewall=1,ip=dhcp,type=veth \