Page 1 of 1

autoupdate generates a cron error

Posted: Tue May 06, 2014 11:26 am
by mephivio
perimeter : Vestacp 0.9.8-8 - Ubuntu 12.04

Team,

i have activate the new function <enable autoupdate> from the "Updates menu"
it generates a new cron task (and i had the omit star like i discovered previously) for sudo /usr/local/vesta/bin/v-update-sys-vesta-all

I check the script and all seems to be fine BUT i receive a cron log every day with :
/usr/local/vesta/bin/v-update-sys-vesta-all: line 13: /func/main.sh: No such file or directory
/usr/local/vesta/bin/v-update-sys-vesta-all: line 14: /conf/vesta.conf: No such file or directory
/usr/local/vesta/bin/v-update-sys-vesta-all: line 23: /v-update-sys-vesta: No such file or directory
/usr/local/vesta/bin/v-update-sys-vesta-all: line 23: /v-update-sys-vesta: No such file or directory
/usr/local/vesta/bin/v-update-sys-vesta-all: line 23: /v-update-sys-vesta: No such file or directory

Any idea ? why the $VESTA is not processed ?

i don't have any trouble with the others cron tasks

Thanks for your help

Mephivio

Re: autoupdate generates a cron error

Posted: Tue May 06, 2014 11:55 am
by imperio
Do you have this files ?

Code: Select all

usr/local/vesta/conf/vesta.conf
usr/local/vesta/func/main.sh
usr/local/vesta/bin//v-update-sys-vesta

Re: autoupdate generates a cron error

Posted: Tue May 06, 2014 12:32 pm
by mephivio
yes of course
(if it is not i can't use the others scripts)

Re: autoupdate generates a cron error

Posted: Wed Jul 02, 2014 2:42 pm
by Affliction
I am also having the same problem...I'm using CentOS 6.5 64-Bit and receive the same cron error as OP does.

Re: autoupdate generates a cron error

Posted: Wed Jul 02, 2014 2:47 pm
by imperio
This bug wiil be solved in the next release

Re: autoupdate generates a cron error

Posted: Wed Jul 02, 2014 6:11 pm
by imperio
Now you can disable auto update for vestacp

Re: autoupdate generates a cron error

Posted: Wed Jul 23, 2014 7:46 pm
by reshet
I fixed it by modifying file /usr/local/vesta/bin/v-update-sys-vesta-all

Code: Select all

#!/bin/bash
# info: update all vesta packages
# options: USER [RESTART]
#
# The function of updating all vesta packages


#----------------------------------------------------------#
#                    Variable&Function                     #
#----------------------------------------------------------#

# Importing system enviroment  as we run this script
# mostly by cron wich not read it by itself
source /etc/profile

# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf


#----------------------------------------------------------#
#                       Action                             #
#----------------------------------------------------------#

# Starting update loop
for package in vesta vesta-nginx vesta-php; do
    $VESTA/bin/v-update-sys-vesta "$package"
done

#----------------------------------------------------------#
#                       Vesta                              #
#----------------------------------------------------------#

exit

Re: autoupdate generates a cron error

Posted: Mon Aug 18, 2014 12:07 pm
by xtc
For me the problem was the lack of a definition of $VESTA.

To fix this in any of the scripts, add the following to the top:

Code: Select all

source /etc/profile
$VESTA is defined in /etc/profile.d/vesta.sh which will be loaded each time /etc/profile is sourced.