Skip to content

Commit 2709087

Browse files
committed
Fix hardcoded vesta/hestia location.
1 parent 622b890 commit 2709087

9 files changed

+60
-60
lines changed

bin/v-add-cron-letsencrypt-job

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#----------------------------------------------------------#
1111

1212
# Includes
13-
source $VESTA/func/main.sh
14-
source $VESTA/conf/vesta.conf
13+
source $HESTIA/func/main.sh
14+
source $HESTIA/conf/vesta.conf
1515

1616

1717
#----------------------------------------------------------#
@@ -26,15 +26,15 @@ is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
2626
#----------------------------------------------------------#
2727

2828
# Add cron job
29-
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue letsencrypt"
30-
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
29+
cmd="sudo $HESTIA/bin/v-update-sys-queue letsencrypt"
30+
check_cron=$(grep "$cmd" $HESTIA/data/users/admin/cron.conf 2> /dev/null)
3131
if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
3232
$BIN/v-add-cron-job admin '*/5' '*' '*' '*' '*' "$cmd"
3333
fi
3434

3535

3636
#----------------------------------------------------------#
37-
# Vesta #
37+
# Hestia #
3838
#----------------------------------------------------------#
3939

4040
# Logging

bin/v-add-cron-restart-job

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#----------------------------------------------------------#
1111

1212
# Includes
13-
source $VESTA/func/main.sh
14-
source $VESTA/conf/vesta.conf
13+
source $HESTIA/func/main.sh
14+
source $HESTIA/conf/hestia.conf
1515

1616

1717
#----------------------------------------------------------#
@@ -26,15 +26,15 @@ is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
2626
#----------------------------------------------------------#
2727

2828
# Add cron job
29-
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue restart"
30-
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
29+
cmd="sudo $HESTIA/bin/v-update-sys-queue restart"
30+
check_cron=$(grep "$cmd" $HESTIA/data/users/admin/cron.conf 2> /dev/null)
3131
if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
3232
$BIN/v-add-cron-job admin '*' '*' '*' '*' '*' "$cmd"
3333
fi
3434

3535

3636
#----------------------------------------------------------#
37-
# Vesta #
37+
# Hestia #
3838
#----------------------------------------------------------#
3939

4040
# Logging

bin/v-add-firewall-chain

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ protocol=$(echo $protocol|tr '[:lower:]' '[:upper:]')
2121
# Defining absolute path to iptables
2222
iptables="/sbin/iptables"
2323

24-
# Get vesta port by reading nginx.conf
25-
vestaport=$(grep 'listen' /usr/local/vesta/nginx/conf/nginx.conf | awk '{print $2}' | sed "s|;||")
26-
if [ -z "$vestaport" ]; then
27-
vestaport=8083
24+
# Get hestia port by reading nginx.conf
25+
hestiaport=$(grep 'listen' $HESTIA/nginx/conf/nginx.conf | awk '{print $2}' | sed "s|;||")
26+
if [ -z "$hestiaport" ]; then
27+
hestiaport=8083
2828
fi
2929

3030
# Includes
31-
source $VESTA/func/main.sh
32-
source $VESTA/conf/vesta.conf
31+
source $HESTIA/func/main.sh
32+
source $HESTIA/conf/hestia.conf
3333

3434

3535
#----------------------------------------------------------#
@@ -53,7 +53,7 @@ case $chain in
5353
DNS) port=53; protocol=UDP ;;
5454
WEB) port='80,443'; protocol=TCP ;;
5555
DB) port='3306,5432'; protocol=TCP ;;
56-
VESTA) port=$vestaport; protocol=TCP ;;
56+
HESTIA) port=$hestiaport; protocol=TCP ;;
5757
*) check_args '2' "$#" 'CHAIN PORT' ;;
5858
esac
5959

@@ -72,7 +72,7 @@ if [ $? -eq 0 ]; then
7272
fi
7373

7474
# Preserving chain
75-
chains=$VESTA/data/firewall/chains.conf
75+
chains=$HESTIA/data/firewall/chains.conf
7676
check_chain=$(grep "CHAIN='$chain'" $chains 2>/dev/null)
7777
if [ -z "$check_chain" ]; then
7878
echo "CHAIN='$chain' PORT='$port' PROTOCOL='$protocol'" >> $chains
@@ -83,7 +83,7 @@ chmod 660 $chains
8383

8484

8585
#----------------------------------------------------------#
86-
# Vesta #
86+
# Hestia #
8787
#----------------------------------------------------------#
8888

8989
# Logging

bin/v-add-remote-dns-host

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ dns_user=${6-dns-cluster}
2424
DNS_USER=$dns_user
2525

2626
# Includes
27-
source $VESTA/func/main.sh
28-
source $VESTA/func/remote.sh
29-
source $VESTA/conf/vesta.conf
27+
source $HESTIA/func/main.sh
28+
source $HESTIA/func/remote.sh
29+
source $HESTIA/conf/hestia.conf
3030

3131

3232
#----------------------------------------------------------#
@@ -57,14 +57,14 @@ str="$str DNS_USER='$dns_user' TYPE='$type' SUSPENDED='no'"
5757
str="$str TIME='$time' DATE='$date'"
5858

5959
# Adding host to dns-cluster.conf
60-
echo "$str" >> $VESTA/conf/dns-cluster.conf
61-
chmod 660 $VESTA/conf/dns-cluster.conf
60+
echo "$str" >> $HESTIA/conf/dns-cluster.conf
61+
chmod 660 $HESTIA/conf/dns-cluster.conf
6262

6363
# Enabling DNS_CLUSTER
64-
if [ -z "$(grep DNS_CLUSTER $VESTA/conf/vesta.conf)" ]; then
65-
sed -i "s/^STATS_/DNS_CLUSTER='yes'\nSTATS_/g" $VESTA/conf/vesta.conf
64+
if [ -z "$(grep DNS_CLUSTER $HESTIA/conf/hestia.conf)" ]; then
65+
sed -i "s/^STATS_/DNS_CLUSTER='yes'\nSTATS_/g" $HESTIA/conf/hestia.conf
6666
else
67-
sed -i "s/DNS_CLUSTER=.*/DNS_CLUSTER='yes'/g" $VESTA/conf/vesta.conf
67+
sed -i "s/DNS_CLUSTER=.*/DNS_CLUSTER='yes'/g" $HESTIA/conf/hestia.conf
6868
fi
6969

7070
# Enabling remote dns-cluster queue
@@ -77,12 +77,12 @@ check_result $? "$HOST sync failed" $E_CONNECT
7777

7878

7979
#----------------------------------------------------------#
80-
# Vesta #
80+
# Hestia #
8181
#----------------------------------------------------------#
8282

8383
# Adding local dns-cluster cron job
84-
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue dns-cluster"
85-
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
84+
cmd="sudo $HESTIA/bin/v-update-sys-queue dns-cluster"
85+
check_cron=$(grep "$cmd" $HESTIA/data/users/admin/cron.conf 2> /dev/null)
8686
if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
8787
$BIN/v-add-cron-job admin '*/5' '*' '*' '*' '*' "$cmd"
8888
fi

bin/v-delete-cron-restart-job

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#----------------------------------------------------------#
1111

1212
# Includes
13-
source $VESTA/func/main.sh
14-
source $VESTA/conf/vesta.conf
13+
source $HESTIA/func/main.sh
14+
source $HESTIA/conf/hestia.conf
1515

1616

1717
#----------------------------------------------------------#
@@ -26,16 +26,16 @@ is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
2626
#----------------------------------------------------------#
2727

2828
# Add cron job
29-
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue restart"
30-
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
29+
cmd="sudo $HESTIA/bin/v-update-sys-queue restart"
30+
check_cron=$(grep "$cmd" $HESTIA/data/users/admin/cron.conf 2> /dev/null)
3131
if [ ! -z "$check_cron" ]; then
3232
eval $check_cron
3333
$BIN/v-delete-cron-job admin "$JOB"
3434
fi
3535

3636

3737
#----------------------------------------------------------#
38-
# Vesta #
38+
# Hestia #
3939
#----------------------------------------------------------#
4040

4141
# Logging

bin/v-delete-remote-dns-host

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
host=$1
1414

1515
# Includes
16-
source $VESTA/func/main.sh
17-
source $VESTA/func/remote.sh
18-
source $VESTA/conf/vesta.conf
16+
source $HESTIA/func/main.sh
17+
source $HESTIA/func/remote.sh
18+
source $HESTIA/conf/hestia.conf
1919

2020

2121
#----------------------------------------------------------#
@@ -36,17 +36,17 @@ is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
3636
$BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
3737

3838
# Deleting server
39-
sed -i "/HOST='$host' /d" $VESTA/conf/dns-cluster.conf
39+
sed -i "/HOST='$host' /d" $HESTIA/conf/dns-cluster.conf
4040

4141
# Deleting DNS_CLUSTER key
42-
check_cluster=$(grep HOST $VESTA/conf/dns-cluster.conf |wc -l)
42+
check_cluster=$(grep HOST $HESTIA/conf/dns-cluster.conf |wc -l)
4343
if [ "$check_cluster" -eq '0' ]; then
44-
rm -f $VESTA/conf/dns-cluster.conf
45-
sed -i "/DNS_CLUSTER=/d" $VESTA/conf/vesta.conf
44+
rm -f $HESTIA/conf/dns-cluster.conf
45+
sed -i "/DNS_CLUSTER=/d" $HESTIA/conf/vesta.conf
4646

4747
# Delete cron job
48-
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue dns-cluster"
49-
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
48+
cmd="sudo $HESTIA/bin/v-update-sys-queue dns-cluster"
49+
check_cron=$(grep "$cmd" $HESTIA/data/users/admin/cron.conf 2> /dev/null)
5050
if [ ! -z "$check_cron" ]; then
5151
eval $check_cron
5252
$BIN/v-delete-cron-job admin "$JOB"
@@ -55,7 +55,7 @@ fi
5555

5656

5757
#----------------------------------------------------------#
58-
# Vesta #
58+
# Hestia #
5959
#----------------------------------------------------------#
6060

6161
# Logging

bin/v-generate-api-key

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# info: generate api key
33
# options: none
44
#
5-
# The function creates a key file in /usr/local/vesta/data/keys/
5+
# The function creates a key file in $HESTIA/data/keys/
66

77

88
#----------------------------------------------------------#
@@ -13,7 +13,7 @@ keygen()
1313
{
1414
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
1515
}
16-
KEYS='/usr/local/vesta/data/keys/'
16+
KEYS='$HESTIA/data/keys/'
1717
HASH=$(keygen)
1818

1919

@@ -35,7 +35,7 @@ touch ${KEYS}${HASH}
3535
echo ${HASH}
3636

3737
#----------------------------------------------------------#
38-
# Vesta #
38+
# Hestia #
3939
#----------------------------------------------------------#
4040

4141
exit

bin/v-generate-password-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/local/vesta/php/bin/php
1+
#!$HESTIA/php/bin/php
22
<?php
33
//# info: generate password hash
44
//# options: HASH-METHOD SALT PASSWORD

bin/v-restart-proxy

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#----------------------------------------------------------#
1111

1212
# Includes
13-
source $VESTA/func/main.sh
14-
source $VESTA/conf/vesta.conf
13+
source $HESTIA/func/main.sh
14+
source $HESTIA/conf/hestia.conf
1515
PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
1616

1717
send_email_report() {
18-
email=$(grep CONTACT $VESTA/data/users/admin/user.conf)
18+
email=$(grep CONTACT $HESTIA/data/users/admin/user.conf)
1919
email=$(echo "$email" | cut -f 2 -d "'")
2020
tmpfile=$(mktemp)
2121
subj="$(hostname): $PROXY_SYSTEM restart failed"
@@ -37,19 +37,19 @@ fi
3737

3838
# Schedule restart
3939
if [ "$1" = 'scheduled' ]; then
40-
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
40+
echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
4141
exit
4242
fi
4343
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
44-
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
44+
echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
4545
exit
4646
fi
4747

4848
if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
4949
exit
5050
fi
5151

52-
if [ -f "/usr/local/vesta/web/inc/nginx_proxy" ]; then
52+
if [ -f "$HESTIA/web/inc/nginx_proxy" ]; then
5353

5454
# if vesta is behind default nginx, restart in background with 15 sec delay
5555
# background restart
@@ -63,8 +63,8 @@ if [ -f "/usr/local/vesta/web/inc/nginx_proxy" ]; then
6363
fi
6464

6565
# Update restart queue
66-
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
67-
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
66+
if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
67+
sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
6868
fi
6969

7070
exit;
@@ -87,14 +87,14 @@ else
8787
fi
8888

8989
# Update restart queue
90-
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
91-
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
90+
if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
91+
sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
9292
fi
9393

9494
fi
9595

9696
#----------------------------------------------------------#
97-
# Vesta #
97+
# Hestia #
9898
#----------------------------------------------------------#
9999

100100
exit

0 commit comments

Comments
 (0)