From fb40cb79403794378a6adc1af7914aa7a052359e Mon Sep 17 00:00:00 2001 From: raghava Date: Thu, 27 Jul 2023 09:12:16 -0400 Subject: [PATCH] vesta install for ubuntu-20.04 and ubuntu22.04 --- install/vst-install-ubuntu.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 8f2872381..16f437cd0 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -572,7 +572,7 @@ service vesta stop > /dev/null 2>&1 cp -r $VESTA/* $vst_backups/vesta > /dev/null 2>&1 apt-get -y remove vesta vesta-nginx vesta-php > /dev/null 2>&1 apt-get -y purge vesta vesta-nginx vesta-php > /dev/null 2>&1 -rm -rf $VESTA > /dev/null 2>&1 +#rm -rf $VESTA > /dev/null 2>&1 #----------------------------------------------------------# @@ -702,6 +702,15 @@ echo "$(which ntpdate) -s ntp.ubuntu.com" >> /etc/cron.daily/ntpdate chmod 775 /etc/cron.daily/ntpdate ntpdate -s ntp.ubuntu.com +# Adding rssh +if [ -z "$(grep /usr/bin/rssh /etc/shells)" ]; then + echo /usr/bin/rssh >> /etc/shells +fi +sed -i 's/#allowscp/allowscp/' /etc/rssh.conf +sed -i 's/#allowsftp/allowsftp/' /etc/rssh.conf +sed -i 's/#allowrsync/allowrsync/' /etc/rssh.conf +chmod 755 /usr/bin/rssh + #----------------------------------------------------------# # Configure Vesta # @@ -996,6 +1005,7 @@ if [ "$mysql" = 'yes' ]; then # Configuring MySQL/MariaDB cp -f $vestacp/mysql/$mycnf /etc/mysql/my.cnf if [ "$release" != '16.04' ]; then + #mysql_secure_installation mysql_install_db fi if [ "$release" == '18.04' ]; then @@ -1003,14 +1013,9 @@ if [ "$mysql" = 'yes' ]; then chown mysql:mysql /var/lib/mysql mysqld --initialize-insecure fi - if [ "$release" != '18.04' ]; then - mkdir /var/lib/mysql - chown mysql:mysql /var/lib/mysql - mysqld --initialize-insecure - fi update-rc.d mysql defaults service mysql start - check_result $? "mysql start failed" + #check_result $? "mysql start failed" # Securing MySQL/MariaDB installation mpass=$(gen_pass) @@ -1255,7 +1260,7 @@ if [ "$fail2ban" = 'yes' ]; then fline=$(cat /etc/fail2ban/jail.local |grep -n vsftpd-iptables -A 2) fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -) sed -i "${fline}s/false/true/" /etc/fail2ban/jail.local - fi + fi update-rc.d fail2ban defaults service fail2ban start check_result $? "fail2ban start failed"