258258# Brief Info #
259259# ----------------------------------------------------------#
260260
261- # Printing nice ascii aslogo
261+ # Printing nice ASCII logo
262262clear
263263echo
264264echo ' _| _| _|_|_|_| _|_|_| _|_|_|_|_| _|_|'
@@ -490,7 +490,7 @@ mv /var/lib/mysql $vst_backups/mysql/mysql_datadir > /dev/null 2>&1
490490cp -r /etc/mysql/* $vst_backups /mysql > /dev/null 2>&1
491491mv -f /root/.my.cnf $vst_backups /mysql > /dev/null 2>&1
492492
493- # Backup vesta
493+ # Backup Vesta
494494service vesta stop > /dev/null 2>&1
495495cp -r $VESTA /* $vst_backups /vesta > /dev/null 2>&1
496496apt-get -y remove vesta vesta-nginx vesta-php > /dev/null 2>&1
@@ -584,7 +584,7 @@ chmod a+x /usr/sbin/policy-rc.d
584584apt-get -y install $software
585585check_result $? " apt-get install failed"
586586
587- # Restore policy
587+ # Restore policy
588588rm -f /usr/sbin/policy-rc.d
589589
590590
@@ -602,8 +602,8 @@ rm -f /etc/cron.d/awstats
602602# Set directory color
603603echo ' LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
604604
605- # Register /sbin/nologin
606- echo " /sbin/nologin" >> /etc/shells
605+ # Register /usr/ sbin/nologin
606+ echo " /usr/ sbin/nologin" >> /etc/shells
607607
608608# NTP Synchronization
609609echo ' #!/bin/sh' > /etc/cron.daily/ntpdate
@@ -639,10 +639,10 @@ echo 'PATH=$PATH:'$VESTA'/bin' >> /root/.bash_profile
639639echo ' export PATH' >> /root/.bash_profile
640640source /root/.bash_profile
641641
642- # Configuring logrotate for vesta logs
642+ # Configuring logrotate for Vesta logs
643643wget $vestacp /logrotate/vesta -O /etc/logrotate.d/vesta
644644
645- # Buidling directory tree and creating some blank files for vesta
645+ # Buidling directory tree and creating some blank files for Vesta
646646mkdir -p $VESTA /conf $VESTA /log $VESTA /ssl $VESTA /data/ips \
647647 $VESTA /data/queue $VESTA /data/users $VESTA /data/firewall \
648648 $VESTA /data/sessions
@@ -658,12 +658,12 @@ ln -s $VESTA/log /var/log/vesta
658658chown admin:admin $VESTA /data/sessions
659659chmod 770 $VESTA /data/sessions
660660
661- # Generating vesta configuration
661+ # Generating Vesta configuration
662662rm -f $VESTA /conf/vesta.conf 2> /dev/null
663663touch $VESTA /conf/vesta.conf
664664chmod 660 $VESTA /conf/vesta.conf
665665
666- # WEB stack
666+ # Web stack
667667if [ " $apache " = ' yes' ] && [ " $nginx " = ' no' ] ; then
668668 echo " WEB_SYSTEM='apache2'" >> $VESTA /conf/vesta.conf
669669 echo " WEB_RGROUPS='www-data'" >> $VESTA /conf/vesta.conf
867867
868868
869869# ----------------------------------------------------------#
870- # Configure VSFTPD #
870+ # Configure Vsftpd #
871871# ----------------------------------------------------------#
872872
873873if [ " $vsftpd " = ' yes' ]; then
@@ -904,14 +904,14 @@ if [ "$mysql" = 'yes' ]; then
904904 mycnf=" my-large.cnf"
905905 fi
906906
907- # MySQL configuration
907+ # Configuring MySQL/MariaDB
908908 wget $vestacp /mysql/$mycnf -O /etc/mysql/my.cnf
909909 mysql_install_db
910910 update-rc.d mysql defaults
911911 service mysql start
912912 check_result $? " mysql start failed"
913913
914- # Securing MySQL installation
914+ # Securing MySQL/MariaDB installation
915915 mysqladmin -u root password $vpass
916916 echo -e " [client]\npassword='$vpass '\n" > /root/.my.cnf
917917 chmod 600 /root/.my.cnf
10491049
10501050
10511051# ----------------------------------------------------------#
1052- # Configure RoundCube #
1052+ # Configure Roundcube #
10531053# ----------------------------------------------------------#
10541054
10551055if [ " $exim " = ' yes' ] && [ " $mysql " = ' yes' ]; then
@@ -1114,37 +1114,37 @@ if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
11141114 groupdel admin > /dev/null 2>&1
11151115fi
11161116
1117- # Adding vesta account
1117+ # Adding Vesta admin account
11181118$VESTA /bin/v-add-user admin $vpass $email default System Administrator
11191119check_result $? " can't create admin user"
11201120$VESTA /bin/v-change-user-shell admin bash
11211121$VESTA /bin/v-change-user-language admin $lang
11221122
1123- # Configuring system ips
1123+ # Configuring system IPs
11241124$VESTA /bin/v-update-sys-ip
11251125
1126- # Get main ip
1126+ # Get main IP
11271127ip=$( ip addr| grep ' inet ' | grep global| head -n1| awk ' {print $2}' | cut -f1 -d/)
11281128
11291129# Firewall configuration
11301130if [ " $iptables " = ' yes' ]; then
11311131 $VESTA /bin/v-update-firewall
11321132fi
11331133
1134- # Get public ip
1134+ # Get public IP
11351135pub_ip=$( curl -s vestacp.com/what-is-my-ip/)
11361136if [ ! -z " $pub_ip " ] && [ " $pub_ip " != " $ip " ]; then
11371137 $VESTA /bin/v-change-sys-ip-nat $ip $pub_ip
11381138 ip=$pub_ip
11391139fi
11401140
1141- # Configuring mysql host
1141+ # Configuring MySQL host
11421142if [ " $mysql " = ' yes' ]; then
11431143 $VESTA /bin/v-add-database-host mysql localhost root $vpass
11441144 $VESTA /bin/v-add-database admin default default $( gen_pass) mysql
11451145fi
11461146
1147- # Configuring pgsql host
1147+ # Configuring PostgreSQL host
11481148if [ " $postgresql " = ' yes' ]; then
11491149 $VESTA /bin/v-add-database-host pgsql localhost postgres $vpass
11501150 $VESTA /bin/v-add-database admin db db $( gen_pass) pgsql
@@ -1171,15 +1171,15 @@ command="sudo $VESTA/bin/v-update-sys-rrd"
11711171$VESTA /bin/v-add-cron-job ' admin' ' */5' ' *' ' *' ' *' ' *' " $command "
11721172service cron restart
11731173
1174- # Building inititall rrd images
1174+ # Building initital rrd images
11751175$VESTA /bin/v-update-sys-rrd
11761176
11771177# Enabling file system quota
11781178if [ " $quota " = ' yes' ]; then
11791179 $VESTA /bin/v-add-sys-quota
11801180fi
11811181
1182- # Starting vesta service
1182+ # Starting Vesta service
11831183update-rc.d vesta defaults
11841184service vesta start
11851185check_result $? " vesta start failed"
@@ -1199,7 +1199,7 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
11991199# Sending install notification to vestacp.com
12001200wget vestacp.com/notify/? $codename -O /dev/null -q
12011201
1202- # Comparing hostname and ip
1202+ # Comparing hostname and IP
12031203host_ip=$( host $servername | head -n 1 | awk ' {print $NF}' )
12041204if [ " $host_ip " = " $ip " ]; then
12051205 ip=" $servername "
0 commit comments