Page 1 of 1

Received an error email no clue what it is..

Posted: Sat Oct 30, 2021 5:26 am
by amelie.viennot
Hi Guys,

I just received this email sent by CRON from [email protected] with the following content

/usr/local/vesta/bin/v-update-sys-vesta: line 41: syntax error near unexpected token `fi'
/usr/local/vesta/bin/v-update-sys-vesta: line 41: `fi [ "$package" = "vesta-ioncube" ]; then '
/usr/local/vesta/bin/v-update-sys-vesta: line 41: syntax error near unexpected token `fi'
/usr/local/vesta/bin/v-update-sys-vesta: line 41: `fi [ "$package" = "vesta-ioncube" ]; then '
/usr/local/vesta/bin/v-update-sys-vesta: line 41: syntax error near unexpected token `fi'
/usr/local/vesta/bin/v-update-sys-vesta: line 41: `fi [ "$package" = "vesta-ioncube" ]; then '
/usr/local/vesta/bin/v-update-sys-vesta: line 41: syntax error near unexpected token `fi'
/usr/local/vesta/bin/v-update-sys-vesta: line 41: `fi [ "$package" = "vesta-ioncube" ]; then '


Any idea why I am receiving this and what it is ?

thaanks

Re: Received an error email no clue what it is..

Posted: Sat Oct 30, 2021 8:53 am
by quacos
Vesta has been updated this night. Apparently it's broken.

Re: Received an error email no clue what it is..

Posted: Tue Nov 02, 2021 5:08 am
by vallev
Hello. This is just a mistake in the script: they put "fi" instead of "if". Actually, there are more important issues can be experienced after the update. In my case it was that Let's Encrypt support was broken and it won't turn on via the CP anymore, I had to use v-add-letsencrypt-domain. Anyway, it's better to turn off auto-update to avoid anything like this next time.

Re: Received an error email no clue what it is..

Posted: Mon Nov 08, 2021 10:56 am
by dmg
This is the manual solution I have applied:

1 - Connect using SFTP to "/usr/local/vesta" on your server.
2 - Download "bin" folder, find "v-update-sys-vesta" file.
3 - Edit "v-update-sys-vesta" file with Visual Studio code.
4 - Replace:
fi [ "$package" = "vesta-ioncube" ];
with:
if [ "$package" = "vesta-ioncube" ];
5 - Upload the edited file using SFTP to "/usr/local/vesta/bin", replacing the current file on the server.
6 - Give 777 permissions to the uploaded file.
7 - Connect to server using SSH (using putty or similar).
8 - Execute: "sudo /usr/local/vesta/bin/v-update-sys-vesta-all" in the cmd, your vestaCP must be updated correctly (it takes 1-2 minutes).
9 - If you want to check your actual version just execute "sudo /usr/local/vesta/bin/v-list-sys-vesta-updates" in the cmd.

From this moment on, your cron update will be executed without errors.

Hope this solution will help somebody.

Regards.

Re: Received an error email no clue what it is..

Posted: Wed Nov 17, 2021 4:04 pm
by vesta_mtl
Thanks. You can open the file in vim on the server as well with this:

Code: Select all

vi /usr/local/vesta/bin/v-update-sys-vesta
Then scroll to make the simple "fi" change to "if":
https://github.com/serghey-rodin/vesta/pull/2074/files

Re: Received an error email no clue what it is..

Posted: Wed Dec 15, 2021 12:51 pm
by romariosantana1
vesta_mtl wrote:
Wed Nov 17, 2021 4:04 pm
Thanks. You can open the file in vim on the server as well with this:

Code: Select all

vi /usr/local/vesta/bin/v-update-sys-vesta
Then scroll to make the simple "fi" change to "if":
https://github.com/serghey-rodin/vesta/pull/2074/files
It worked perfectly for me.
Upgrading to version 1.0.5