mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 18:50:08 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7926aa771f
commit
c17133e818
18
.pct-helpers
18
.pct-helpers
@ -242,7 +242,7 @@ buildAssets(){
|
||||
local TEMPLATE_DIR=$1
|
||||
TEMPLATE_DIR=${TEMPLATE_DIR:=templates}
|
||||
local ASSETS_DIR=$2
|
||||
TEMPLATE_DIR=${ASSETS_DIR:=assets}
|
||||
ASSETS_DIR=${ASSETS_DIR:=assets}
|
||||
|
||||
local TEMPLATES=($(find "$TEMPLATE_DIR" -type f))
|
||||
for file in "${TEMPLATES[@]}" ; do
|
||||
@ -254,15 +254,15 @@ buildAssets(){
|
||||
mkdir -p "$(dirname "${ASSETS_DIR}/${file}")"
|
||||
cat "${TEMPLATE_DIR}/${file}" \
|
||||
| sed \
|
||||
-e 's/\${EMAIL}/'$EMAIL'/' \
|
||||
-e 's/\${DOMAIN}/'$DOMAIN'/' \
|
||||
-e 's/\${CTHOSTNAME}/'$CTHOSTNAME'/' \
|
||||
-e 's/\${WAN_IP}/'${WAN_IP/\//\\/}'/' \
|
||||
-e 's/\${WAN_GATE}/'$WAN_GATE'/' \
|
||||
-e 's/\${LAN_IP}/'${LAN_IP/\//\\/}'/' \
|
||||
-e 's/\${EMAIL}/'$EMAIL'/g' \
|
||||
-e 's/\${DOMAIN}/'$DOMAIN'/g' \
|
||||
-e 's/\${CTHOSTNAME}/'$CTHOSTNAME'/g' \
|
||||
-e 's/\${WAN_IP}/'${WAN_IP/\//\\/}'/g' \
|
||||
-e 's/\${WAN_GATE}/'$WAN_GATE'/g' \
|
||||
-e 's/\${LAN_IP}/'${LAN_IP/\//\\/}'/g' \
|
||||
-e 's/\${LAN_GATE}/'$LAN_GATE'/' \
|
||||
-e 's/\${ADMIN_IP}/'${ADMIN_IP/\//\\/}'/' \
|
||||
-e 's/\${ADMIN_GATE}/'$ADMIN_GATE'/' \
|
||||
-e 's/\${ADMIN_IP}/'${ADMIN_IP/\//\\/}'/g' \
|
||||
-e 's/\${ADMIN_GATE}/'$ADMIN_GATE'/g' \
|
||||
> "${ASSETS_DIR}/${file}"
|
||||
done
|
||||
}
|
||||
|
||||
@ -4,12 +4,12 @@ iface lo inet6 loopback
|
||||
|
||||
auto admin
|
||||
iface admin inet static
|
||||
address 10.0.0.2
|
||||
address ${ADMIN_IP}
|
||||
hostname $(hostname)
|
||||
|
||||
auto lan
|
||||
iface lan inet static
|
||||
address 10.1.1.2
|
||||
address ${LAN_IP}
|
||||
hostname $(hostname)
|
||||
|
||||
auto wan
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user