Skip to content

Commit 5d031ca

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#501 from Lupul/dev-0707-02
Add missing global variable 'SCRIPT'
2 parents fe045c5 + 8db457e commit 5d031ca

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

func/main.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ SENDMAIL="$HESTIA/web/inc/mail-wrapper.php"
1818
HESTIA_GIT_REPO="https://raw.githubusercontent.com/hestiacp/hestiacp"
1919
HESTIA_THEMES="$HESTIA/themes"
2020
HESTIA_THEMES_CUSTOM="$HESTIA/data/templates/themes"
21+
SCRIPT="$(basename $0)"
2122

2223
# Return codes
2324
OK=0

install/hst-install-debian.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,8 @@ command="sudo $HESTIA/bin/v-update-sys-queue webstats"
17911791
$HESTIA/bin/v-add-cron-job 'admin' '30' '03' '*' '*' '*' "$command"
17921792
command="sudo $HESTIA/bin/v-update-sys-queue backup"
17931793
$HESTIA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
1794+
command="sudo $HESTIA/bin/v-update-sys-queue restart"
1795+
$HESTIA/bin/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
17941796
command="sudo $HESTIA/bin/v-backup-users"
17951797
$HESTIA/bin/v-add-cron-job 'admin' '10' '05' '*' '*' '*' "$command"
17961798
command="sudo $HESTIA/bin/v-update-user-stats"

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,8 @@ command="sudo $HESTIA/bin/v-update-sys-queue webstats"
16871687
$HESTIA/bin/v-add-cron-job 'admin' '30' '03' '*' '*' '*' "$command"
16881688
command="sudo $HESTIA/bin/v-update-sys-queue backup"
16891689
$HESTIA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
1690+
command="sudo $HESTIA/bin/v-update-sys-queue restart"
1691+
$HESTIA/bin/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
16901692
command="sudo $HESTIA/bin/v-backup-users"
16911693
$HESTIA/bin/v-add-cron-job 'admin' '10' '05' '*' '*' '*' "$command"
16921694
command="sudo $HESTIA/bin/v-update-user-stats"

install/upgrade/versions/latest.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fi
2121

2222
# Implement recidive jail for fail2ban
2323
if [ ! -z "$FIREWALL_EXTENSION" ]; then
24-
if ! cat /etc/fail2ban/jail.local | grep -q "recidive"; then
24+
if ! cat /etc/fail2ban/jail.local | grep -q "\[recidive\]"; then
2525
echo -e "\n\n[recidive]\nenabled = true\nfilter = recidive\naction = hestia[name=HESTIA]\nlogpath = /var/log/fail2ban.log\nmaxretry = 3\nfindtime = 86400\nbantime = 864000" >> /etc/fail2ban/jail.local
2626
fi
2727
fi
@@ -34,4 +34,9 @@ if [ ! -z "$IMAP_SYSTEM" ]; then
3434
cp -f /etc/nginx/conf.d/webmail.inc $HESTIA_BACKUP/conf/
3535
sed -i "s/config|temp|logs/README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING/g" /etc/nginx/conf.d/webmail.inc
3636
fi
37-
fi
37+
fi
38+
39+
if [ -z "$(v-list-cron-jobs admin | grep 'v-update-sys-queue backup')" ]; then
40+
command="sudo $BIN/v-update-sys-queue restart"
41+
$BIN/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
42+
fi

0 commit comments

Comments
 (0)