Skip to content

Commit 08acf2e

Browse files
committed
Replace nameserver in hosting packages with customer domain name.
1 parent 665780b commit 08acf2e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

install/hst-install-debian.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,13 @@ echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
11001100
# Installing hosting packages
11011101
cp -rf $hestiacp/packages $HESTIA/data/
11021102

1103+
# Update nameservers in hosting package
1104+
IFS='.' read -r -a domain_elements <<< "$servername"
1105+
if [ ! -z "${domain_elements[-2]}" ] && [ ! -z "${domain_elements[-1]}" ]; then
1106+
serverdomain="${domain_elements[-2]}.${domain_elements[-1]}"
1107+
sed -i s/"domain.tld"/"$serverdomain"/g $HESTIA/data/packages/*.pkg
1108+
fi
1109+
11031110
# Installing templates
11041111
cp -rf $hestiacp/templates $HESTIA/data/
11051112

install/hst-install-ubuntu.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,13 @@ echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
10631063
# Installing hosting packages
10641064
cp -rf $hestiacp/packages $HESTIA/data/
10651065

1066+
# Update nameservers in hosting package
1067+
IFS='.' read -r -a domain_elements <<< "$servername"
1068+
if [ ! -z "${domain_elements[-2]}" ] && [ ! -z "${domain_elements[-1]}" ]; then
1069+
serverdomain="${domain_elements[-2]}.${domain_elements[-1]}"
1070+
sed -i s/"domain.tld"/"$serverdomain"/g $HESTIA/data/packages/*.pkg
1071+
fi
1072+
10661073
# Installing templates
10671074
cp -rf $hestiacp/templates $HESTIA/data/
10681075

0 commit comments

Comments
 (0)