|
@@ -588,7 +588,7 @@ APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key > /dev/n
|
|
|
|
|
|
|
|
# Installing MariaDB repo
|
|
# Installing MariaDB repo
|
|
|
echo "(*) MariaDB"
|
|
echo "(*) MariaDB"
|
|
|
-echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
|
|
|
|
|
|
|
+echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/$VERSION $codename main" > $apt/mariadb.list
|
|
|
if [ "$release" -eq 8 ]; then
|
|
if [ "$release" -eq 8 ]; then
|
|
|
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
|
|
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
|
|
|
else
|
|
else
|
|
@@ -597,7 +597,7 @@ fi
|
|
|
|
|
|
|
|
# Installing Backport repo for debian 8
|
|
# Installing Backport repo for debian 8
|
|
|
if [ "$release" -eq 8 ]; then
|
|
if [ "$release" -eq 8 ]; then
|
|
|
- echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
|
|
|
|
|
|
+ echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Installing Backport repo for debian 10
|
|
# Installing Backport repo for debian 10
|
|
@@ -888,13 +888,13 @@ rm -f /usr/sbin/policy-rc.d
|
|
|
# Configure system #
|
|
# Configure system #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
|
|
+echo "Configure System"
|
|
|
# Enable SSH password authentication
|
|
# Enable SSH password authentication
|
|
|
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
|
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
|
|
|
|
|
|
|
# Enable SFTP subsystem for SSH
|
|
# Enable SFTP subsystem for SSH
|
|
|
sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
|
|
sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
|
|
|
if [ ! -z "$sftp_subsys_enabled" ]; then
|
|
if [ ! -z "$sftp_subsys_enabled" ]; then
|
|
|
- echo "(*) Updating SFTP subsystem configuration..."
|
|
|
|
|
sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
|
|
sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
@@ -944,6 +944,7 @@ chmod 755 /usr/bin/rssh
|
|
|
# Configure Hestia #
|
|
# Configure Hestia #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
|
|
+echo "Configure Hestia"
|
|
|
# Installing sudo configuration
|
|
# Installing sudo configuration
|
|
|
mkdir -p /etc/sudoers.d
|
|
mkdir -p /etc/sudoers.d
|
|
|
cp -f $hestiacp/sudo/admin /etc/sudoers.d/
|
|
cp -f $hestiacp/sudo/admin /etc/sudoers.d/
|
|
@@ -1032,7 +1033,6 @@ fi
|
|
|
# Mail stack
|
|
# Mail stack
|
|
|
if [ "$exim" = 'yes' ]; then
|
|
if [ "$exim" = 'yes' ]; then
|
|
|
echo "MAIL_SYSTEM='exim4'" >> $HESTIA/conf/hestia.conf
|
|
echo "MAIL_SYSTEM='exim4'" >> $HESTIA/conf/hestia.conf
|
|
|
- echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
if [ "$clamd" = 'yes' ]; then
|
|
if [ "$clamd" = 'yes' ]; then
|
|
|
echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $HESTIA/conf/hestia.conf
|
|
echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $HESTIA/conf/hestia.conf
|
|
|
fi
|
|
fi
|
|
@@ -1067,8 +1067,8 @@ echo "BACKUP_SYSTEM='local'" >> $HESTIA/conf/hestia.conf
|
|
|
echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
|
|
echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
|
|
|
# Version & Release Branch
|
|
# Version & Release Branch
|
|
|
-echo "VERSION='0.10.0'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
-echo "RELEASE='develop'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
|
|
+echo "VERSION='1.0.1'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
+echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
|
|
|
# Installing hosting packages
|
|
# Installing hosting packages
|
|
|
cp -rf $hestiacp/packages $HESTIA/data/
|
|
cp -rf $hestiacp/packages $HESTIA/data/
|
|
@@ -1090,6 +1090,7 @@ cp -rf $hestiacp/firewall $HESTIA/data/
|
|
|
$HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
|
|
$HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
|
|
|
|
|
|
|
|
# Generating SSL certificate
|
|
# Generating SSL certificate
|
|
|
|
|
+echo "Generate ssl certificate"
|
|
|
$HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
|
|
$HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
|
|
|
'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
|
|
'San Francisco' 'Hestia Control Panel' 'IT' > /tmp/hst.pem
|
|
|
|
|
|
|
@@ -1099,6 +1100,7 @@ key_start=$(grep -n "BEGIN RSA" /tmp/hst.pem |cut -f 1 -d:)
|
|
|
key_end=$(grep -n "END RSA" /tmp/hst.pem |cut -f 1 -d:)
|
|
key_end=$(grep -n "END RSA" /tmp/hst.pem |cut -f 1 -d:)
|
|
|
|
|
|
|
|
# Adding SSL certificate
|
|
# Adding SSL certificate
|
|
|
|
|
+echo "Add ssl certificate to Hestia"
|
|
|
cd $HESTIA/ssl
|
|
cd $HESTIA/ssl
|
|
|
sed -n "1,${crt_end}p" /tmp/hst.pem > certificate.crt
|
|
sed -n "1,${crt_end}p" /tmp/hst.pem > certificate.crt
|
|
|
sed -n "$key_start,${key_end}p" /tmp/hst.pem > certificate.key
|
|
sed -n "$key_start,${key_end}p" /tmp/hst.pem > certificate.key
|
|
@@ -1112,16 +1114,17 @@ rm /tmp/hst.pem
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$nginx" = 'yes' ]; then
|
|
if [ "$nginx" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Nginx Webserver"
|
|
|
rm -f /etc/nginx/conf.d/*.conf
|
|
rm -f /etc/nginx/conf.d/*.conf
|
|
|
cp -f $hestiacp/nginx/nginx.conf /etc/nginx/
|
|
cp -f $hestiacp/nginx/nginx.conf /etc/nginx/
|
|
|
cp -f $hestiacp/nginx/status.conf /etc/nginx/conf.d/
|
|
cp -f $hestiacp/nginx/status.conf /etc/nginx/conf.d/
|
|
|
cp -f $hestiacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
|
|
cp -f $hestiacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
|
|
|
cp -f $hestiacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
|
|
cp -f $hestiacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
|
|
|
- cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
|
|
|
|
|
cp -f $hestiacp/logrotate/nginx /etc/logrotate.d/
|
|
cp -f $hestiacp/logrotate/nginx /etc/logrotate.d/
|
|
|
mkdir -p /etc/nginx/conf.d/domains
|
|
mkdir -p /etc/nginx/conf.d/domains
|
|
|
mkdir -p /var/log/nginx/domains
|
|
mkdir -p /var/log/nginx/domains
|
|
|
if [ "$apache" = 'no' ] && [ "$multiphp" = 'yes' ]; then
|
|
if [ "$apache" = 'no' ] && [ "$multiphp" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Nginx MultiPHP"
|
|
|
rm -fr $HESTIA/data/templates/web/nginx/*
|
|
rm -fr $HESTIA/data/templates/web/nginx/*
|
|
|
for v in "${multiphp_v[@]}"; do
|
|
for v in "${multiphp_v[@]}"; do
|
|
|
update-rc.d php$v-fpm defaults > /dev/null 2>&1
|
|
update-rc.d php$v-fpm defaults > /dev/null 2>&1
|
|
@@ -1147,7 +1150,14 @@ if [ "$nginx" = 'yes' ]; then
|
|
|
|
|
|
|
|
# Update dns servers in nginx.conf
|
|
# Update dns servers in nginx.conf
|
|
|
dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
|
|
dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
|
|
|
- sed -i "s/1.0.0.1 1.1.1.1/$dns_resolver/g" /etc/nginx/nginx.conf
|
|
|
|
|
|
|
+ for ip in $dns_resolver; do
|
|
|
|
|
+ if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
|
|
|
+ resolver="$ip $resolver"
|
|
|
|
|
+ fi
|
|
|
|
|
+ done
|
|
|
|
|
+ if [ ! -z "$resolver" ]; then
|
|
|
|
|
+ sed -i "s/1.0.0.1 1.1.1.1/$resolver/g" /etc/nginx/nginx.conf
|
|
|
|
|
+ fi
|
|
|
|
|
|
|
|
update-rc.d nginx defaults > /dev/null 2>&1
|
|
update-rc.d nginx defaults > /dev/null 2>&1
|
|
|
service nginx start >> $LOG
|
|
service nginx start >> $LOG
|
|
@@ -1160,6 +1170,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$apache" = 'yes' ]; then
|
|
if [ "$apache" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Apache Webserver"
|
|
|
cp -f $hestiacp/apache2/apache2.conf /etc/apache2/
|
|
cp -f $hestiacp/apache2/apache2.conf /etc/apache2/
|
|
|
cp -f $hestiacp/apache2/status.conf /etc/apache2/mods-enabled/
|
|
cp -f $hestiacp/apache2/status.conf /etc/apache2/mods-enabled/
|
|
|
cp -f $hestiacp/logrotate/apache2 /etc/logrotate.d/
|
|
cp -f $hestiacp/logrotate/apache2 /etc/logrotate.d/
|
|
@@ -1180,6 +1191,7 @@ if [ "$apache" = 'yes' ]; then
|
|
|
chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
|
|
chmod 640 /var/log/apache2/access.log /var/log/apache2/error.log
|
|
|
chmod 751 /var/log/apache2/domains
|
|
chmod 751 /var/log/apache2/domains
|
|
|
if [ "$multiphp" = 'yes' ] ; then
|
|
if [ "$multiphp" = 'yes' ] ; then
|
|
|
|
|
+ echo "Configure Apache MultiPHP"
|
|
|
a2enmod proxy_fcgi setenvif > /dev/null 2>&1
|
|
a2enmod proxy_fcgi setenvif > /dev/null 2>&1
|
|
|
for v in "${multiphp_v[@]}"; do
|
|
for v in "${multiphp_v[@]}"; do
|
|
|
a2enconf php$v-fpm-fpm > /dev/null 2>&1
|
|
a2enconf php$v-fpm-fpm > /dev/null 2>&1
|
|
@@ -1210,6 +1222,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$phpfpm" = 'yes' ]; then
|
|
if [ "$phpfpm" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure PHP-FPM"
|
|
|
cp -f $hestiacp/php-fpm/www.conf /etc/php/$fpm_v/fpm/pool.d/www.conf
|
|
cp -f $hestiacp/php-fpm/www.conf /etc/php/$fpm_v/fpm/pool.d/www.conf
|
|
|
update-rc.d php$fpm_v-fpm defaults > /dev/null 2>&1
|
|
update-rc.d php$fpm_v-fpm defaults > /dev/null 2>&1
|
|
|
service php$fpm_v-fpm start >> $LOG
|
|
service php$fpm_v-fpm start >> $LOG
|
|
@@ -1221,6 +1234,7 @@ fi
|
|
|
# Configure PHP #
|
|
# Configure PHP #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
|
|
+echo "Configure PHP Timezone"
|
|
|
ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
|
|
ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
|
|
|
if [ -z "$ZONE" ]; then
|
|
if [ -z "$ZONE" ]; then
|
|
|
ZONE='UTC'
|
|
ZONE='UTC'
|
|
@@ -1242,6 +1256,7 @@ chmod 755 /etc/cron.daily/php-session-cleanup
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$vsftpd" = 'yes' ]; then
|
|
if [ "$vsftpd" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Vsftpd"
|
|
|
cp -f $hestiacp/vsftpd/vsftpd.conf /etc/
|
|
cp -f $hestiacp/vsftpd/vsftpd.conf /etc/
|
|
|
touch /var/log/vsftpd.log
|
|
touch /var/log/vsftpd.log
|
|
|
chown root:adm /var/log/vsftpd.log
|
|
chown root:adm /var/log/vsftpd.log
|
|
@@ -1261,6 +1276,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$proftpd" = 'yes' ]; then
|
|
if [ "$proftpd" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure ProFTPD server"
|
|
|
echo "127.0.0.1 $servername" >> /etc/hosts
|
|
echo "127.0.0.1 $servername" >> /etc/hosts
|
|
|
cp -f $hestiacp/proftpd/proftpd.conf /etc/proftpd/
|
|
cp -f $hestiacp/proftpd/proftpd.conf /etc/proftpd/
|
|
|
update-rc.d proftpd defaults > /dev/null 2>&1
|
|
update-rc.d proftpd defaults > /dev/null 2>&1
|
|
@@ -1274,6 +1290,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$mysql" = 'yes' ]; then
|
|
if [ "$mysql" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure MariaDB server"
|
|
|
mycnf="my-small.cnf"
|
|
mycnf="my-small.cnf"
|
|
|
if [ $memory -gt 1200000 ]; then
|
|
if [ $memory -gt 1200000 ]; then
|
|
|
mycnf="my-medium.cnf"
|
|
mycnf="my-medium.cnf"
|
|
@@ -1352,6 +1369,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$postgresql" = 'yes' ]; then
|
|
if [ "$postgresql" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure PostgreSQL database server"
|
|
|
ppass=$(gen_pass)
|
|
ppass=$(gen_pass)
|
|
|
cp -f $hestiacp/postgresql/pg_hba.conf /etc/postgresql/*/main/
|
|
cp -f $hestiacp/postgresql/pg_hba.conf /etc/postgresql/*/main/
|
|
|
service postgresql restart
|
|
service postgresql restart
|
|
@@ -1370,6 +1388,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$named" = 'yes' ]; then
|
|
if [ "$named" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Bind DNS server"
|
|
|
cp -f $hestiacp/bind/named.conf /etc/bind/
|
|
cp -f $hestiacp/bind/named.conf /etc/bind/
|
|
|
cp -f $hestiacp/bind/named.conf.options /etc/bind/
|
|
cp -f $hestiacp/bind/named.conf.options /etc/bind/
|
|
|
chown root:bind /etc/bind/named.conf
|
|
chown root:bind /etc/bind/named.conf
|
|
@@ -1401,6 +1420,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$exim" = 'yes' ]; then
|
|
if [ "$exim" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Exim mail server"
|
|
|
gpasswd -a Debian-exim mail > /dev/null 2>&1
|
|
gpasswd -a Debian-exim mail > /dev/null 2>&1
|
|
|
cp -f $hestiacp/exim/exim4.conf.template /etc/exim4/
|
|
cp -f $hestiacp/exim/exim4.conf.template /etc/exim4/
|
|
|
cp -f $hestiacp/exim/dnsbl.conf /etc/exim4/
|
|
cp -f $hestiacp/exim/dnsbl.conf /etc/exim4/
|
|
@@ -1436,6 +1456,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$dovecot" = 'yes' ]; then
|
|
if [ "$dovecot" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Dovecot"
|
|
|
gpasswd -a dovecot mail > /dev/null 2>&1
|
|
gpasswd -a dovecot mail > /dev/null 2>&1
|
|
|
cp -rf $hestiacp/dovecot /etc/
|
|
cp -rf $hestiacp/dovecot /etc/
|
|
|
cp -f $hestiacp/logrotate/dovecot /etc/logrotate.d/
|
|
cp -f $hestiacp/logrotate/dovecot /etc/logrotate.d/
|
|
@@ -1488,6 +1509,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$spamd" = 'yes' ]; then
|
|
if [ "$spamd" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure SpamAssassin"
|
|
|
update-rc.d spamassassin defaults > /dev/null 2>&1
|
|
update-rc.d spamassassin defaults > /dev/null 2>&1
|
|
|
sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
|
|
sed -i "s/ENABLED=0/ENABLED=1/" /etc/default/spamassassin
|
|
|
service spamassassin start >> $LOG
|
|
service spamassassin start >> $LOG
|
|
@@ -1503,11 +1525,15 @@ fi
|
|
|
# Configure Roundcube #
|
|
# Configure Roundcube #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
-if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
|
|
|
|
|
|
|
+if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Roundcube"
|
|
|
if [ "$apache" = 'yes' ]; then
|
|
if [ "$apache" = 'yes' ]; then
|
|
|
cp -f $hestiacp/roundcube/apache.conf /etc/roundcube/
|
|
cp -f $hestiacp/roundcube/apache.conf /etc/roundcube/
|
|
|
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
|
|
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
|
|
|
fi
|
|
fi
|
|
|
|
|
+ if [ "$nginx" = 'yes' ]; then
|
|
|
|
|
+ cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
|
|
|
|
|
+ fi
|
|
|
cp -f $hestiacp/roundcube/main.inc.php /etc/roundcube/config.inc.php
|
|
cp -f $hestiacp/roundcube/main.inc.php /etc/roundcube/config.inc.php
|
|
|
cp -f $hestiacp/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
|
|
cp -f $hestiacp/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
|
|
|
cp -f $hestiacp/roundcube/config.inc.php /etc/roundcube/plugins/password/
|
|
cp -f $hestiacp/roundcube/config.inc.php /etc/roundcube/plugins/password/
|
|
@@ -1552,6 +1578,16 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
+ # Configure webmail alias
|
|
|
|
|
+ echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
|
|
|
|
|
+
|
|
|
|
|
+ # Restart services
|
|
|
|
|
+ if [ "$apache" = 'yes' ]; then
|
|
|
|
|
+ service apache2 restart
|
|
|
|
|
+ fi
|
|
|
|
|
+ if [ "$nginx" = 'yes' ]; then
|
|
|
|
|
+ service nginx restart
|
|
|
|
|
+ fi
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1560,6 +1596,7 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
if [ "$fail2ban" = 'yes' ]; then
|
|
if [ "$fail2ban" = 'yes' ]; then
|
|
|
|
|
+ echo "Configure Fail2Ban"
|
|
|
cp -rf $hestiacp/fail2ban /etc/
|
|
cp -rf $hestiacp/fail2ban /etc/
|
|
|
if [ "$dovecot" = 'no' ]; then
|
|
if [ "$dovecot" = 'no' ]; then
|
|
|
fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
|
|
fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
|
|
@@ -1737,9 +1774,6 @@ service hestia start
|
|
|
check_result $? "hestia start failed"
|
|
check_result $? "hestia start failed"
|
|
|
chown admin:admin $HESTIA/data/sessions
|
|
chown admin:admin $HESTIA/data/sessions
|
|
|
|
|
|
|
|
-# Adding cronjob for autoupdates
|
|
|
|
|
-$HESTIA/bin/v-add-cron-hestia-autoupdate
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
# Hestia Access Info #
|
|
# Hestia Access Info #
|
|
@@ -1793,13 +1827,17 @@ echo
|
|
|
cat $tmpfile
|
|
cat $tmpfile
|
|
|
rm -f $tmpfile
|
|
rm -f $tmpfile
|
|
|
|
|
|
|
|
|
|
+# Add welcome message to notification panel
|
|
|
|
|
+$HESTIA/bin/v-add-user-notification admin 'Welcome!' 'For more information on how to use Hestia Control Panel, click on the Help icon in the top right corner of the toolbar.<br><br>Please report any bugs or issues on GitHub at<br>https://github.com/hestiacp/hestiacp/Issues<br><br>Have a great day!'
|
|
|
|
|
+
|
|
|
echo "(!) IMPORTANT: You must logout or restart the server before continuing."
|
|
echo "(!) IMPORTANT: You must logout or restart the server before continuing."
|
|
|
|
|
+echo ""
|
|
|
if [ "$interactive" = 'yes' ]; then
|
|
if [ "$interactive" = 'yes' ]; then
|
|
|
echo -n " Do you want to logout now? [Y/N] "
|
|
echo -n " Do you want to logout now? [Y/N] "
|
|
|
read resetshell
|
|
read resetshell
|
|
|
|
|
|
|
|
if [ "$resetshell" = "Y" ] || [ "$resetshell" = "y" ]; then
|
|
if [ "$resetshell" = "Y" ] || [ "$resetshell" = "y" ]; then
|
|
|
- logout
|
|
|
|
|
|
|
+ exit
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
|