mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-25 21:02:04 +00:00
Compare commits
No commits in common. "8cd017b28cd3148ba1797e4c19970c25ab08e446" and "74c1fdf5197c3e0eddfb2bdac6770a3478c3ba3d" have entirely different histories.
8cd017b28c
...
74c1fdf519
@ -18,7 +18,6 @@ readConfig
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
DFL_ID=${DFL_ID:=101}
|
||||
# XXX revise...
|
||||
DFL_CTHOSTNAME=${GATE_HOSTNAME:=${DFL_CTHOSTNAME:=gate}}
|
||||
|
||||
CORES=1
|
||||
@ -29,10 +28,8 @@ DRIVE=0.5
|
||||
DFL_WAN_IP=${DFL_WAN_IP}
|
||||
DFL_WAN_GATE=${DFL_WAN_GATE}
|
||||
|
||||
# XXX revise...
|
||||
DFL_ADMIN_IP=${GATE_ADMIN_IP:=${DFL_ADMIN_IP:=10.0.0.2/24}}
|
||||
ADMIN_GATE=-
|
||||
# XXX revise...
|
||||
DFL_LAN_IP=${GATE_LAN_IP:=${DFL_LAN_IP:=10.1.1.2/24}}
|
||||
LAN_GATE=-
|
||||
|
||||
|
||||
@ -22,15 +22,9 @@ DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=nextcloud}
|
||||
|
||||
DFL_CORES=${DFL_CORES:=2}
|
||||
DFL_RAM=${DFL_RAM:=2048}
|
||||
DFL_SWAP=${DFL_SWAP:=${DFL_RAM}}
|
||||
DFL_SWAP=${DFL_SWAP:=${DFL_RAM:=2048}}
|
||||
DFL_DRIVE=${DFL_DRIVE:=40}
|
||||
|
||||
# Nextcloud-specific configuration...
|
||||
#APP_DOMAIN=nc.$DOMAIN
|
||||
#DB_PASS=
|
||||
#APP_PASS=
|
||||
#SEC_ALERTS=SKIP
|
||||
|
||||
WAN_IP=-
|
||||
WAN_GATE=-
|
||||
ADMIN_IP=-
|
||||
@ -76,16 +70,12 @@ sleep ${TIMEOUT:=5}
|
||||
|
||||
tklWaitForSetup
|
||||
|
||||
|
||||
# XXX this breaks the rest of this script...
|
||||
echo "# Starting TKL UI..."
|
||||
# XXX might be a good idea to reaaad stuff from config...
|
||||
@ lxc-attach $ID -- bash -c "\
|
||||
HUB_APIKEY=SKIP \
|
||||
SEC_UPDATES=SKIP \
|
||||
${APP_DOMAIN:+APP_DOMAIN=${APP_DOMAIN}} \
|
||||
${DB_PASS:+DB_PASS=${DB_PASS}} \
|
||||
${APP_PASS:+APP_PASS=${APP_PASS}} \
|
||||
${SEC_ALERTS:+SEC_ALERTS=${SEC_ALERTS}} \
|
||||
/usr/sbin/turnkey-init"
|
||||
@ lxc-attach $ID -- bash -c 'HUB_APIKEY=SKIP SEC_UPDATES=SKIP /usr/sbin/turnkey-init'
|
||||
sleep 5
|
||||
|
||||
|
||||
echo "# Updating config..."
|
||||
# add gate IP to trusted_proxies...
|
||||
@ -94,7 +84,7 @@ echo "# Updating config..."
|
||||
-e \"/trusted_domains/i\\ 'trusted_proxies' =>\\n array (\\n '${GATE_LAN_IP/\/*}\\/32',\\n ),\" \
|
||||
/var/www/nextcloud/config/config.php"
|
||||
# add self IP to trusted_domains -- enable setup from local network...
|
||||
IP=$([ -z $DRY_RUN ] && lxc-attach $ID -- hostname -I)
|
||||
IP=${DRY_RUN:=$(lxc-attach $ID -- hostname -I)}
|
||||
@ lxc-attach $ID -- bash -c "\
|
||||
sed -z -i \
|
||||
-e \"s/\\(trusted_domains[^)]*\\)/\\1 2 => '${IP/ *}',\\n /\" \
|
||||
@ -110,15 +100,16 @@ echo "# Disabling fail2ban..."
|
||||
|
||||
echo "# Updating system..."
|
||||
@ lxc-attach $ID apt update
|
||||
@ lxc-attach $ID -- apt upgrade -y
|
||||
@ lxc-attach $ID apt upgrade
|
||||
|
||||
echo "# Post config..."
|
||||
pctSet $ID "${OPTS_STAGE_2}" $REBOOT
|
||||
|
||||
|
||||
echo "# Done."
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# vim:set ts=4 sw=4 :
|
||||
|
||||
|
||||
|
||||
@ -27,12 +27,9 @@ DRIVE=0.5
|
||||
|
||||
WAN_IP=-
|
||||
WAN_GATE=-
|
||||
# XXX revise...
|
||||
DFL_ADMIN_IP=${DFL_ADMIN_IP:=10.0.0.1/24}
|
||||
ADMIN_GATE=-
|
||||
# XXX revise...
|
||||
DFL_LAN_IP=${NS_LAN_IP:=${DFL_LAN_IP:=10.1.1.1/24}}
|
||||
# XXX revise...
|
||||
DFL_LAN_GATE=${GATE_LAN_IP:=${DFL_LAN_GATE:=10.1.1.2}}
|
||||
DFL_LAN_GATE=${DFL_LAN_GATE/\/*}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=ssh}
|
||||
|
||||
DFL_CORES=${DFL_CORES:=1}
|
||||
DFL_RAM=${DFL_RAM:=1024}
|
||||
DFL_SWAP=${DFL_SWAP:=${DFL_RAM}}
|
||||
DFL_SWAP=${DFL_SWAP:=${DFL_RAM:=1024}}
|
||||
DFL_DRIVE=${DFL_DRIVE:=16}
|
||||
|
||||
WAN_IP=-
|
||||
|
||||
@ -22,7 +22,7 @@ DFL_CTHOSTNAME=${DFL_CTHOSTNAME:=syncthing}
|
||||
|
||||
DFL_CORES=${DFL_CORES:=1}
|
||||
DFL_RAM=${DFL_RAM:=1024}
|
||||
DFL_SWAP=${DFL_SWAP:=${DFL_RAM}}
|
||||
DFL_SWAP=${DFL_SWAP:=${DFL_RAM:=1024}}
|
||||
DFL_DRIVE=${DFL_DRIVE:=8}
|
||||
|
||||
WAN_IP=-
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user