Support

UNiTE, Remote CLI, eXtract Wizard

#38318 Exit Status

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
7.3
Tool
UNiTE
Tool version
5.0.0

Latest post by [email protected] on Monday, 13 February 2023 03:49 CST

[email protected]

Hello,

We have updated our Unite.phar file for doing automatic restore of our Wordpress.

The Unite is executed successfully according to the logs :

[sshexec] [INFO ] Reconfiguring WordPress
[sshexec] [INFO ] Preparing to replace WordPress data
[sshexec] [INFO ] No replacements necessary
[sshexec] [INFO ] Updating the .htaccess file
[sshexec] [INFO ] Cleaning up after restoration
[sshexec] [INFO ] ===============================================================================
[sshexec] [INFO ] UNITE finished running
[sshexec] [INFO ] Peak memory consumption : 7.89 MB

But it seems that you have changed the exit status code, the script is exiting with an status '127'

I did not find anything related to the exit status code in your documentation and I can not find any error in the execution of the script. But our monitoring is now seeing the result of the execution as 'failed'.

Can you please tell me if the return code is the expected one and can you return 0 in case of success ?

Best,

Β 

nicholas
Akeeba Staff
Manager

In case of success it does return an exit status 0. Run the restoration with the command line option --verbose to see if there's any additional information about what is going on.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

[email protected]

I do run the restoration command in verbose mode and there is no error at all.

This is the result of the full restoration and the return code :

Akeeba Unite Configuration file /conf/wordpress.xml found
Akeeba UNiTE 5.0.0 (2022-10-11)
Copyright Β©2008-2023 Nicholas K. Dionysopoulos / Akeeba Ltd.

This program comes with ABSOLUTELY NO WARRANTY. This is Free Software and you
are welcome to redistribute it under certain conditions. Use command license
for details.

Β 

[INFO ] Parsing /conf/wordpress.xml
[INFO ] Validating the source data
[INFO ] Renaming the existing .htaccess file
[INFO ] Writing a stealth .htaccess file
[INFO ] Extracting backup archive
947335803/947335803 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“] 100% 15 secs[INFO ] Checking ANGIE support
[INFO ] Setting up the restoration script for unattended restoration
[INFO ] Locking the web restoration script with a random password
[INFO ] Detected site restoration platform: Wordpress
[INFO ] Validating WordPress restoration configuration information
[INFO ] Resetting the restoration script
[INFO ] Detecting the backed up site's CMS version
[INFO ] Detecting the backed up site's configuration
[INFO ] Starting restoration of database contents
[INFO ] Restoring site database
100/100 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“] 100% 4 secs[INFO ] Reconfiguring WordPress
[INFO ] Preparing to replace WordPress data
[INFO ] No replacements necessary
[INFO ] Updating the .htaccess file
[INFO ] Cleaning up after restoration
[INFO ] ===============================================================================
[INFO ] UNITE finished running
[INFO ] Peak memory consumption : 7.89 MB
bash-4.2$ $?
bash: 127: command not found

nicholas
Akeeba Staff
Manager

There is a typo. The PostRun controller which prints out the last two lines doesn't return a value which triggers the error code 127 output. Thank you for reporting this, I'll fix it in the next version planned for next week.

Side note on what you did in this line here:

bash-4.2$ $?
bash: 127: command not found

The command to see the last exist status is echo $? since $? is simply referencing the internal shell variable which holds the last exit code. What you wrote asks Bash to execute the last exit status. Best not to do that, it can be potential security issue. Best way to break the habit? alias 0="sl";alias 127="sl" in your ~/.bashrc and install the sl (steam locomotive) package.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

[email protected]

Thanks for the tip ! :-)

thomascgi_custom-fa1741025b00f1e188b3a31914a4d6e60afe528c-s1100-c50.jpg

[email protected]

Latest version deployed and tested. Return code is OK now ;)

Closing this ticket

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!