mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 19:20:10 +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
|
local TEMPLATE_DIR=$1
|
||||||
TEMPLATE_DIR=${TEMPLATE_DIR:=templates}
|
TEMPLATE_DIR=${TEMPLATE_DIR:=templates}
|
||||||
local ASSETS_DIR=$2
|
local ASSETS_DIR=$2
|
||||||
TEMPLATE_DIR=${ASSETS_DIR:=assets}
|
ASSETS_DIR=${ASSETS_DIR:=assets}
|
||||||
|
|
||||||
local TEMPLATES=($(find "$TEMPLATE_DIR" -type f))
|
local TEMPLATES=($(find "$TEMPLATE_DIR" -type f))
|
||||||
for file in "${TEMPLATES[@]}" ; do
|
for file in "${TEMPLATES[@]}" ; do
|
||||||
@ -254,15 +254,15 @@ buildAssets(){
|
|||||||
mkdir -p "$(dirname "${ASSETS_DIR}/${file}")"
|
mkdir -p "$(dirname "${ASSETS_DIR}/${file}")"
|
||||||
cat "${TEMPLATE_DIR}/${file}" \
|
cat "${TEMPLATE_DIR}/${file}" \
|
||||||
| sed \
|
| sed \
|
||||||
-e 's/\${EMAIL}/'$EMAIL'/' \
|
-e 's/\${EMAIL}/'$EMAIL'/g' \
|
||||||
-e 's/\${DOMAIN}/'$DOMAIN'/' \
|
-e 's/\${DOMAIN}/'$DOMAIN'/g' \
|
||||||
-e 's/\${CTHOSTNAME}/'$CTHOSTNAME'/' \
|
-e 's/\${CTHOSTNAME}/'$CTHOSTNAME'/g' \
|
||||||
-e 's/\${WAN_IP}/'${WAN_IP/\//\\/}'/' \
|
-e 's/\${WAN_IP}/'${WAN_IP/\//\\/}'/g' \
|
||||||
-e 's/\${WAN_GATE}/'$WAN_GATE'/' \
|
-e 's/\${WAN_GATE}/'$WAN_GATE'/g' \
|
||||||
-e 's/\${LAN_IP}/'${LAN_IP/\//\\/}'/' \
|
-e 's/\${LAN_IP}/'${LAN_IP/\//\\/}'/g' \
|
||||||
-e 's/\${LAN_GATE}/'$LAN_GATE'/' \
|
-e 's/\${LAN_GATE}/'$LAN_GATE'/' \
|
||||||
-e 's/\${ADMIN_IP}/'${ADMIN_IP/\//\\/}'/' \
|
-e 's/\${ADMIN_IP}/'${ADMIN_IP/\//\\/}'/g' \
|
||||||
-e 's/\${ADMIN_GATE}/'$ADMIN_GATE'/' \
|
-e 's/\${ADMIN_GATE}/'$ADMIN_GATE'/g' \
|
||||||
> "${ASSETS_DIR}/${file}"
|
> "${ASSETS_DIR}/${file}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,12 +4,12 @@ iface lo inet6 loopback
|
|||||||
|
|
||||||
auto admin
|
auto admin
|
||||||
iface admin inet static
|
iface admin inet static
|
||||||
address 10.0.0.2
|
address ${ADMIN_IP}
|
||||||
hostname $(hostname)
|
hostname $(hostname)
|
||||||
|
|
||||||
auto lan
|
auto lan
|
||||||
iface lan inet static
|
iface lan inet static
|
||||||
address 10.1.1.2
|
address ${LAN_IP}
|
||||||
hostname $(hostname)
|
hostname $(hostname)
|
||||||
|
|
||||||
auto wan
|
auto wan
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user