Skip to content

Commit d750c4b

Browse files
authored
Rename zone to hestia-zone (hestiacp#3245)
Allow "zone" to be used for "full" implementation of Zone transfer without the need of "Hestia API"
1 parent d516d42 commit d750c4b

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

bin/v-add-remote-dns-domain

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if [ -z "$str" ]; then
5555
fi
5656
exit
5757
fi
58-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
58+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
5959
str=$(echo "$str" | sed "s/SLAVE='no'/SLAVE='yes'/g")
6060
str=$(echo "$str" | sed "s/SLAVE=''/SLAVE='yes'/g")
6161
ip=$($BIN/v-list-sys-ips plain | cut -f1 | head -n1)
@@ -73,7 +73,7 @@ for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do
7373
# Parsing domain parameters
7474
parse_object_kv_list "$str"
7575

76-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
76+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
7777
# Syncing domain data
7878
cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME $flush 'no'
7979
check_result $? "$HOST connection failed" "$E_CONNECT"
@@ -101,7 +101,7 @@ for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do
101101
fi
102102
done
103103

104-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
104+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
105105
rndc notify $domain > /dev/null 2>&1
106106
fi
107107
#----------------------------------------------------------#

bin/v-add-remote-dns-record

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ if [ -z "$str" ]; then
5454
fi
5555
exit
5656
fi
57-
# $DNS_CLUSTER_SYSTEM = "zone" doesn't need to be uopdated
57+
# $DNS_CLUSTER_SYSTEM = "hestia-zone" doesn't need to be uopdated
5858

59-
if [ "$DNS_CLUSTER_SYSTEM" != "zone" ]; then
59+
if [ "$DNS_CLUSTER_SYSTEM" != "hestia-zone" ]; then
6060
IFS=$'\n'
6161
for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do
6262

bin/v-change-remote-dns-domain-exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do
5252

5353
# Syncing domain
5454
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
55-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
55+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
5656
str=$(echo "$str" | sed "s/SLAVE='no'/SLAVE='yes'/g")
5757
ip=$($BIN/v-list-sys-ips plain | cut -f1)
5858
str=$(echo "$str" | sed "s/MASTER='*'/MASTER='$ip'/g")

bin/v-change-remote-dns-domain-soa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do
5252
# Parsing remote host parameters
5353
parse_object_kv_list "$cluster"
5454

55-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
55+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
5656
str=$(echo "$str" | sed "s/SLAVE='no'/SLAVE='yes'/g")
5757
ip=$($BIN/v-list-sys-ips plain | cut -f1)
5858
str=$(echo "$str" | sed "s/MASTER='*'/MASTER='$ip'/g")

bin/v-change-remote-dns-domain-ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do
5454

5555
# Syncing TTL
5656
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
57-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
57+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
5858
str=$(echo "$str" | sed "s/SLAVE='no'/SLAVE='yes'/g")
5959
ip=$($BIN/v-list-sys-ips plain | cut -f1)
6060
str=$(echo "$str" | sed "s/MASTER='*'/MASTER='$ip'/g")

bin/v-restart-service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ restart=$2
1919
source /etc/hestiacp/hestia.conf
2020
# shellcheck source=/usr/local/hestia/func/main.sh
2121
source $HESTIA/func/main.sh
22+
source_conf "$HESTIA/conf/hestia.conf"
2223

2324
#----------------------------------------------------------#
2425
# Verifications #
@@ -77,7 +78,7 @@ for service in $service_list; do
7778
"$service" = "proftpd" -o \
7879
"$service" = "ssh" -o \
7980
"$service" = "fail2ban" ]; then
80-
systemctl reload-or-restart "$service" > /dev/null 2>&1
81+
systemctl reload-or-restart "$service" >> $log 2>&1
8182
else
8283
systemctl reset-failed "$service" >> $log 2>&1
8384
systemctl restart "$service" >> $log 2>&1

bin/v-sync-dns-cluster

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ for cluster in $hosts; do
6868
unset $SLAVE
6969
parse_object_kv_list "$str"
7070
if [ "$SLAVE" != "yes" ]; then
71-
if [ "$DNS_CLUSTER_SYSTEM" != "zone" ]; then
71+
if [ "$DNS_CLUSTER_SYSTEM" != "hestia-zone" ]; then
7272
# Syncing domain index
7373

7474
cluster_cmd v-insert-dns-domain "$DNS_USER" "$str" "$HOSTNAME" ' ' "no"
@@ -82,7 +82,7 @@ for cluster in $hosts; do
8282
cluster_cmd v-insert-dns-records "$DNS_USER" "$DOMAIN" "$tmp_file" 'no'
8383
check_result $? "$HOST connection failed" "$E_CONNECT"
8484
fi
85-
if [ "$DNS_CLUSTER_SYSTEM" = "zone" ]; then
85+
if [ "$DNS_CLUSTER_SYSTEM" = "hestia-zone" ]; then
8686
str=$(echo "$str" | sed "s/SLAVE='no'/SLAVE='yes'/g")
8787
str=$(echo "$str" | sed "s/SLAVE=''/SLAVE='yes'/g")
8888

@@ -100,7 +100,7 @@ for cluster in $hosts; do
100100
done
101101
fi
102102
done
103-
if [ "$DNS_CLUSTER_SYSTEM" != "zone" ]; then
103+
if [ "$DNS_CLUSTER_SYSTEM" != "hestia-zone" ]; then
104104
# Rebuilding dns zones
105105
cluster_cmd v-rebuild-dns-domains "$DNS_USER"
106106
check_result $? "$TYPE connection to $HOST failed" "$E_CONNECT"

docs/docs/server-administration/dns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ There is no limitation on how to chain DNS servers.
4848
### DNS Cluster with the Hestia API (Master -> Slave)
4949

5050
1. Create a new user on the Hestia server that will act as a “Slave”.
51-
2. In `/usr/local/hestia/conf/hestia.conf`, change `DNS_CLUSTER_SYSTEM='hestia'` to `DNS_CLUSTER_SYSTEM='zone'`.
51+
2. In `/usr/local/hestia/conf/hestia.conf`, change `DNS_CLUSTER_SYSTEM='hestia'` to `DNS_CLUSTER_SYSTEM='hestia-zone'`.
5252
3. On the master server, open `/etc/bind/named.options`, do the following changes, then restart bind9 with `systemctl restart bind9`.
5353

5454
```bash
@@ -87,7 +87,7 @@ There is no limitation on how to chain DNS servers.
8787

8888
### Converting an existing DNS cluster to Master -> Slave
8989

90-
1. In `/usr/local/hestia/conf/hestia.conf`, change `DNS_CLUSTER_SYSTEM='hestia'` to `DNS_CLUSTER_SYSTEM='zone'`.
90+
1. In `/usr/local/hestia/conf/hestia.conf`, change `DNS_CLUSTER_SYSTEM='hestia'` to `DNS_CLUSTER_SYSTEM='hestia-zone'`.
9191
2. On the master server, open `/etc/bind/named.options`, do the following changes, then restart bind9 with `systemctl restart bind9`.
9292

9393
```bash

0 commit comments

Comments
 (0)