273273# Brief Info #
274274# ----------------------------------------------------------#
275275
276- # Printing nice ascii aslogo
276+ # Printing nice ASCII logo
277277clear
278278echo
279279echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|'
@@ -508,7 +508,7 @@ if [ "$release" = '16.04' ] && [ -e '/etc/init.d/mysql' ]; then
508508fi
509509
510510
511- # Backup vesta
511+ # Backup Vesta
512512service vesta stop > /dev/null 2>&1
513513cp -r $VESTA /* $vst_backups /vesta > /dev/null 2>&1
514514apt-get -y remove vesta vesta-nginx vesta-php > /dev/null 2>&1
@@ -607,7 +607,7 @@ chmod a+x /usr/sbin/policy-rc.d
607607apt-get -y install $software
608608check_result $? " apt-get install failed"
609609
610- # Restore policy
610+ # Restore policy
611611rm -f /usr/sbin/policy-rc.d
612612
613613
@@ -625,8 +625,8 @@ rm -f /etc/cron.d/awstats
625625# Set directory color
626626echo ' LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
627627
628- # Register /sbin/nologin
629- echo " /sbin/nologin" >> /etc/shells
628+ # Register /usr/ sbin/nologin
629+ echo " /usr/ sbin/nologin" >> /etc/shells
630630
631631# NTP Synchronization
632632echo ' #!/bin/sh' > /etc/cron.daily/ntpdate
@@ -662,10 +662,10 @@ echo 'PATH=$PATH:'$VESTA'/bin' >> /root/.bash_profile
662662echo ' export PATH' >> /root/.bash_profile
663663source /root/.bash_profile
664664
665- # Configuring logrotate for vesta logs
665+ # Configuring logrotate for Vesta logs
666666wget $vestacp /logrotate/vesta -O /etc/logrotate.d/vesta
667667
668- # Buidling directory tree and creating some blank files for vesta
668+ # Buidling directory tree and creating some blank files for Vesta
669669mkdir -p $VESTA /conf $VESTA /log $VESTA /ssl $VESTA /data/ips \
670670 $VESTA /data/queue $VESTA /data/users $VESTA /data/firewall \
671671 $VESTA /data/sessions
@@ -681,12 +681,12 @@ ln -s $VESTA/log /var/log/vesta
681681chown admin:admin $VESTA /data/sessions
682682chmod 770 $VESTA /data/sessions
683683
684- # Generating vesta configuration
684+ # Generating Vesta configuration
685685rm -f $VESTA /conf/vesta.conf 2> /dev/null
686686touch $VESTA /conf/vesta.conf
687687chmod 660 $VESTA /conf/vesta.conf
688688
689- # WEB stack
689+ # Web stack
690690if [ " $apache " = ' yes' ] && [ " $nginx " = ' no' ] ; then
691691 echo " WEB_SYSTEM='apache2'" >> $VESTA /conf/vesta.conf
692692 echo " WEB_RGROUPS='www-data'" >> $VESTA /conf/vesta.conf
892892
893893
894894# ----------------------------------------------------------#
895- # Configure VSFTPD #
895+ # Configure Vsftpd #
896896# ----------------------------------------------------------#
897897
898898if [ " $vsftpd " = ' yes' ]; then
@@ -929,14 +929,14 @@ if [ "$mysql" = 'yes' ]; then
929929 mycnf=" my-large.cnf"
930930 fi
931931
932- # MySQL configuration
932+ # Configuring MySQL/MariaDB
933933 wget $vestacp /mysql/$mycnf -O /etc/mysql/my.cnf
934934 mysql_install_db
935935 update-rc.d mysql defaults
936936 service mysql start
937937 check_result $? " mysql start failed"
938938
939- # Securing MySQL installation
939+ # Securing MySQL/MariaDB installation
940940 mysqladmin -u root password $vpass
941941 echo -e " [client]\npassword='$vpass '\n" > /root/.my.cnf
942942 chmod 600 /root/.my.cnf
10741074
10751075
10761076# ----------------------------------------------------------#
1077- # Configure RoundCube #
1077+ # Configure Roundcube #
10781078# ----------------------------------------------------------#
10791079
10801080if [ " $exim " = ' yes' ] && [ " $mysql " = ' yes' ]; then
@@ -1146,37 +1146,37 @@ if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
11461146 groupdel admin > /dev/null 2>&1
11471147fi
11481148
1149- # Adding vesta account
1149+ # Adding Vesta admin account
11501150$VESTA /bin/v-add-user admin $vpass $email default System Administrator
11511151check_result $? " can't create admin user"
11521152$VESTA /bin/v-change-user-shell admin bash
11531153$VESTA /bin/v-change-user-language admin $lang
11541154
1155- # Configuring system ips
1155+ # Configuring system IPs
11561156$VESTA /bin/v-update-sys-ip
11571157
1158- # Get main ip
1158+ # Get main IP
11591159ip=$( ip addr| grep ' inet ' | grep global| head -n1| awk ' {print $2}' | cut -f1 -d/)
11601160
11611161# Firewall configuration
11621162if [ " $iptables " = ' yes' ]; then
11631163 $VESTA /bin/v-update-firewall
11641164fi
11651165
1166- # Get public ip
1166+ # Get public IP
11671167pub_ip=$( curl -s vestacp.com/what-is-my-ip/)
11681168if [ ! -z " $pub_ip " ] && [ " $pub_ip " != " $ip " ]; then
11691169 $VESTA /bin/v-change-sys-ip-nat $ip $pub_ip
11701170 ip=$pub_ip
11711171fi
11721172
1173- # Configuring mysql host
1173+ # Configuring MySQL host
11741174if [ " $mysql " = ' yes' ]; then
11751175 $VESTA /bin/v-add-database-host mysql localhost root $vpass
11761176 $VESTA /bin/v-add-database admin default default $( gen_pass) mysql
11771177fi
11781178
1179- # Configuring pgsql host
1179+ # Configuring PostgreSQL host
11801180if [ " $postgresql " = ' yes' ]; then
11811181 $VESTA /bin/v-add-database-host pgsql localhost postgres $vpass
11821182 $VESTA /bin/v-add-database admin db db $( gen_pass) pgsql
@@ -1203,15 +1203,15 @@ command="sudo $VESTA/bin/v-update-sys-rrd"
12031203$VESTA /bin/v-add-cron-job ' admin' ' */5' ' *' ' *' ' *' ' *' " $command "
12041204service cron restart
12051205
1206- # Building inititall rrd images
1206+ # Building initital rrd images
12071207$VESTA /bin/v-update-sys-rrd
12081208
12091209# Enabling file system quota
12101210if [ " $quota " = ' yes' ]; then
12111211 $VESTA /bin/v-add-sys-quota
12121212fi
12131213
1214- # Starting vesta service
1214+ # Starting Vesta service
12151215update-rc.d vesta defaults
12161216service vesta start
12171217check_result $? " vesta start failed"
@@ -1231,7 +1231,7 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
12311231# Sending install notification to vestacp.com
12321232wget vestacp.com/notify/? $codename -O /dev/null -q
12331233
1234- # Comparing hostname and ip
1234+ # Comparing hostname and IP
12351235host_ip=$( host $servername | head -n 1 | awk ' {print $NF}' )
12361236if [ " $host_ip " = " $ip " ]; then
12371237 ip=" $servername "
0 commit comments