Automatic Updates Still Not Quite Right

Anyone experienced enough with wget? - I just want to open the page, wget by default downloads. The --spider switch looks like it could work…

You could try wget -q --spider http(s)://YourURL/update

Using -O outputs to a file, which you don’t need in this case. -q just silences the output entirely.

Barcode and qr Code Facility while entering and delivering the product to the customers

Thanks Titanfail - The --spider switch looked like it would be the best option. We’ll see how this pans out for the next update!

@Titanfail, I think it may be a good idea to add the call to /update to the shell script. Someone using the script reported a problem which may be related.

https://www.invoiceninja.com/forums/topic/recurring-invoices-send-at-wrong-date/#post-9197

Added the changes to the update script to run wget -q --spider “$app_url/update”. That SHOULD do the trick, but I’ll know for sure when the next update drops.

Link for the script is still the same.

Thanks for your help!

Great work Titanfail - v3.9.1 has been released. Fingers crossed it should work now! :slight_smile:

I’ll keep you guys posted

Quick caveat on the script I just realized. If it works correctly, you won’t get the update notice on the login screen anymore.

Also, @yuljk, you don’t have to have an MTA installed to get the full cron output from the script. If you pipe it into a file with >> it will append the output to that file every time the script is run.

For example, mine is 0 18 * * * /usr/local/bin/ninja_autoupdate >> /usr/local/logs/ninja_update.log to run it at 6:00pm every day, and keep the output in a log file.

It ends up looking something like this…

Wed Nov  1 18:00:03 EDT 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.
Thu Nov  2 18:00:02 EDT 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.
Fri Nov  3 18:00:02 EDT 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.
Sat Nov  4 18:00:03 EDT 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.
Sun Nov  5 18:00:02 EST 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.
Mon Nov  6 18:00:02 EST 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.
Tue Nov  7 18:00:02 EST 2017 - Invoice Ninja v3.8.1 is installed and is current. No update required.

Wed Nov  8 18:00:02 EST 2017 - Updating Invoice Ninja from v3.8.1 to v3.9.0.

Downloading Invoice Ninja v3.9.0 archive "https://download.invoiceninja.com/ninja-v3.9.0.zip" ...

Extracting to temporary folder "/usr/local/download/InvoiceNinja" ...

Syncing to install folder "/var/www/ninja" ...

Number of files: 31,851 (reg: 27,517, dir: 4,334)
Number of created files: 487 (reg: 440, dir: 47)
Number of deleted files: 0
Number of regular files transferred: 11,415
Total file size: 415,168,194 bytes
Total transferred file size: 202,218,168 bytes
Literal data: 202,218,168 bytes
Matched data: 0 bytes
File list size: 655,298
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 203,534,230
Total bytes received: 227,021

sent 203,534,230 bytes  received 227,021 bytes  11,643,500.06 bytes/sec
total size is 415,168,194  speedup is 2.04

Resetting permissions for "/var/www/ninja/storage" ...

Removing downloaded ZIP file "/usr/local/download/InvoiceNinja/ninja-v3.9.0.zip" ...

Removing temporary folder "/usr/local/download/InvoiceNinja" ...

Wed Nov  8 18:00:53 EST 2017 - Invoice Ninja successfully updated to v3.9.0!

Thu Nov  9 18:00:02 EST 2017 - Invoice Ninja v3.9.0 is installed and is current. No update required.
Fri Nov 10 18:00:02 EST 2017 - Invoice Ninja v3.9.0 is installed and is current. No update required.
Sat Nov 11 18:00:03 EST 2017 - Invoice Ninja v3.9.0 is installed and is current. No update required.
Sun Nov 12 18:00:03 EST 2017 - Invoice Ninja v3.9.0 is installed and is current. No update required.
Mon Nov 13 18:00:03 EST 2017 - Invoice Ninja v3.9.0 is installed and is current. No update required.

Thanks Titanfail - I’ve updated crontab accordingly.