File tree Expand file tree Collapse file tree 4 files changed +57
-3
lines changed
Expand file tree Collapse file tree 4 files changed +57
-3
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ if [ "$web" != 'no' ] && [ -n "$WEB_SYSTEM" ]; then
314314 done
315315 fi
316316 fi
317-
317+
318318 # Merging web.conf keys
319319 str=" DOMAIN='$domain ' IP='$IP ' IP6='$IP6 ' ALIAS='$ALIAS '"
320320 str=" $str CUSTOM_DOCROOT='$CUSTOM_DOCROOT ' CUSTOM_PHPROOT='$CUSTOM_PHPROOT '"
Original file line number Diff line number Diff line change @@ -117,7 +117,15 @@ download_file() {
117117
118118# Defining password-gen function
119119gen_pass () {
120- head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16
120+ matrix=$1
121+ length=$2
122+ if [ -z " $matrix " ]; then
123+ matrix=" A-Za-z0-9"
124+ fi
125+ if [ -z " $length " ]; then
126+ length=16
127+ fi
128+ head /dev/urandom | tr -dc $matrix | head -c$length
121129}
122130
123131# Defining return code check function
@@ -1977,6 +1985,10 @@ command="sudo $HESTIA/bin/v-update-user-stats"
19771985$HESTIA /bin/v-add-cron-job ' admin' ' 20' ' 00' ' *' ' *' ' *' " $command "
19781986command=" sudo $HESTIA /bin/v-update-sys-rrd"
19791987$HESTIA /bin/v-add-cron-job ' admin' ' */5' ' *' ' *' ' *' ' *' " $command "
1988+ command=" sudo $HESTIA /bin/v-update-letsencrypt-ssl"
1989+ min=$( gen_pass ' 012345' ' 2' )
1990+ hour=$( gen_pass ' 1234567' ' 1' )
1991+ $HESTIA /bin/v-add-cron-job ' admin' " $min " " $hour " ' *' ' *' ' *' " $command "
19801992
19811993# Enable automatic updates
19821994$HESTIA /bin/v-add-cron-hestia-autoupdate apt
Original file line number Diff line number Diff line change @@ -98,7 +98,15 @@ download_file() {
9898
9999# Defining password-gen function
100100gen_pass () {
101- head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16
101+ matrix=$1
102+ length=$2
103+ if [ -z " $matrix " ]; then
104+ matrix=" A-Za-z0-9"
105+ fi
106+ if [ -z " $length " ]; then
107+ length=16
108+ fi
109+ head /dev/urandom | tr -dc $matrix | head -c$length
102110}
103111
104112# Defining return code check function
@@ -1997,6 +2005,10 @@ command="sudo $HESTIA/bin/v-update-user-stats"
19972005$HESTIA /bin/v-add-cron-job ' admin' ' 20' ' 00' ' *' ' *' ' *' " $command "
19982006command=" sudo $HESTIA /bin/v-update-sys-rrd"
19992007$HESTIA /bin/v-add-cron-job ' admin' ' */5' ' *' ' *' ' *' ' *' " $command "
2008+ command=" sudo $HESTIA /bin/v-update-letsencrypt-ssl"
2009+ min=$( gen_pass ' 012345' ' 2' )
2010+ hour=$( gen_pass ' 1234567' ' 1' )
2011+ $HESTIA /bin/v-add-cron-job ' admin' " $min " " $hour " ' *' ' *' ' *' " $command "
20002012
20012013# Enable automatic updates
20022014$HESTIA /bin/v-add-cron-hestia-autoupdate apt
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Hestia Control Panel upgrade script for target version 1.6.0
4+
5+ # ######################################################################################
6+ # ###### Place additional commands below. #######
7+ # ######################################################################################
8+ # ###### Pass through information to the end user in case of a issue or problem #######
9+ # ###### #######
10+ # ###### Use add_upgrade_message "My message here" to include a message #######
11+ # ###### in the upgrade notification email. Example: #######
12+ # ###### #######
13+ # ###### add_upgrade_message "My message here" #######
14+ # ###### #######
15+ # ###### You can use \n within the string to create new lines. #######
16+ # ######################################################################################
17+
18+ upgrade_config_set_value ' UPGRADE_UPDATE_WEB_TEMPLATES' ' false'
19+ upgrade_config_set_value ' UPGRADE_UPDATE_DNS_TEMPLATES' ' false'
20+ upgrade_config_set_value ' UPGRADE_UPDATE_MAIL_TEMPLATES' ' false'
21+ upgrade_config_set_value ' UPGRADE_REBUILD_USERS' ' false'
22+ upgrade_config_set_value ' UPGRADE_UPDATE_FILEMANAGER_CONFIG' ' false'
23+
24+ # Adding LE autorenew cronjob if there are none
25+ if [ -z " $( grep v-update-lets $HESTIA /data/users/admin/cron.conf) " ]; then
26+ min=$( generate_password ' 012345' ' 2' )
27+ hour=$( generate_password ' 1234567' ' 1' )
28+ command=" sudo $BIN /v-update-letsencrypt-ssl"
29+ $BIN /v-add-cron-job ' admin' " $min " " $hour " ' *' ' *' ' *' " $command "
30+ fi
You can’t perform that action at this time.
0 commit comments