@@ -10,6 +10,7 @@ RHOST='r.vestacp.com'
1010CHOST=' c.vestacp.com'
1111REPO=' cmmnt'
1212VERSION=' rhel'
13+ VESTA=' /usr/local/vesta'
1314memory=$( grep ' MemTotal' /proc/meminfo | tr ' ' ' \n' | grep [0-9])
1415arch=$( uname -i)
1516os=$( cut -f 1 -d ' ' /etc/redhat-release)
@@ -527,8 +528,8 @@ mv /var/lib/pgsql/data $vst_backups/postgresql/ >/dev/null 2>&1
527528
528529# Backing up Vesta configuration and data
529530service vesta stop > /dev/null 2>&1
530- mv /usr/local/vesta /data/* $vst_backups /vesta > /dev/null 2>&1
531- mv /usr/local/vesta /conf/* $vst_backups /vesta > /dev/null 2>&1
531+ mv $VESTA /data/* $vst_backups /vesta > /dev/null 2>&1
532+ mv $VESTA /conf/* $vst_backups /vesta > /dev/null 2>&1
532533
533534
534535# ----------------------------------------------------------#
@@ -677,10 +678,10 @@ wget $vestacp/sudo/admin -O /etc/sudoers.d/admin
677678chmod 440 /etc/sudoers.d/admin
678679
679680# Configuring system env
680- echo " export VESTA='/usr/local/vesta '" > /etc/profile.d/vesta.sh
681+ echo " export VESTA='$VESTA '" > /etc/profile.d/vesta.sh
681682chmod 755 /etc/profile.d/vesta.sh
682683source /etc/profile.d/vesta.sh
683- echo ' PATH=$PATH:/usr/local/vesta /bin' >> /root/.bash_profile
684+ echo ' PATH=$PATH:' $VESTA ' /bin' >> /root/.bash_profile
684685echo ' export PATH' >> /root/.bash_profile
685686source /root/.bash_profile
686687
@@ -699,7 +700,7 @@ chmod 750 $VESTA/conf $VESTA/data/users $VESTA/data/ips $VESTA/log
699700chmod -R 750 $VESTA /data/queue
700701chmod 660 $VESTA /log/*
701702rm -f /var/log/vesta
702- ln -s /usr/local/vesta /log /var/log/vesta
703+ ln -s $VESTA /log /var/log/vesta
703704chown admin:admin $VESTA /data/sessions
704705chmod 770 $VESTA /data/sessions
705706
@@ -1229,22 +1230,21 @@ fi
12291230$VESTA /bin/v-add-domain admin $servername
12301231check_result $? " can't create $servername domain"
12311232
1232- # Adding cron jobs
1233- command=' sudo /usr/local/vesta/bin/v-update-sys-queue disk'
1233+ command=" sudo $VESTA /bin/v-update-sys-queue disk"
12341234$VESTA /bin/v-add-cron-job ' admin' ' 15' ' 02' ' *' ' *' ' *' " $command "
1235- command=' sudo /usr/local/vesta/ bin/v-update-sys-queue traffic'
1235+ command=" sudo $VESTA / bin/v-update-sys-queue traffic"
12361236$VESTA /bin/v-add-cron-job ' admin' ' 10' ' 00' ' *' ' *' ' *' " $command "
1237- command=' sudo /usr/local/vesta/ bin/v-update-sys-queue webstats'
1237+ command=" sudo $VESTA / bin/v-update-sys-queue webstats"
12381238$VESTA /bin/v-add-cron-job ' admin' ' 30' ' 03' ' *' ' *' ' *' " $command "
1239- command=' sudo /usr/local/vesta/ bin/v-update-sys-queue backup'
1239+ command=" sudo $VESTA / bin/v-update-sys-queue backup"
12401240$VESTA /bin/v-add-cron-job ' admin' ' */5' ' *' ' *' ' *' ' *' " $command "
1241- command=' sudo /usr/local/vesta/ bin/v-backup-users'
1241+ command=" sudo $VESTA / bin/v-backup-users"
12421242$VESTA /bin/v-add-cron-job ' admin' ' 10' ' 05' ' *' ' *' ' *' " $command "
1243- command=' sudo /usr/local/vesta/ bin/v-update-user-stats'
1243+ command=" sudo $VESTA / bin/v-update-user-stats"
12441244$VESTA /bin/v-add-cron-job ' admin' ' 20' ' 00' ' *' ' *' ' *' " $command "
1245- command=' sudo /usr/local/vesta/ bin/v-update-sys-rrd'
1245+ command=" sudo $VESTA / bin/v-update-sys-rrd"
12461246$VESTA /bin/v-add-cron-job ' admin' ' */5' ' *' ' *' ' *' ' *' " $command "
1247- service crond restart
1247+ service cron restart
12481248
12491249# Building inititall rrd images
12501250$VESTA /bin/v-update-sys-rrd
0 commit comments