Advertisement
TitanFail

README

Jan 24th, 2018
2,274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. Invoice Ninja Self-Hosted Update v4.7.1 |
  2. ----------------------------------------+
  3.  
  4. USE AT YOUR OWN RISK
  5.  
  6. This script will automatically update your Invoice Ninja install to the latest version.
  7. It does this by checking https://invoiceninja.org for the latest version string, and then
  8. comparing it to the string in your local version.txt file (/ninja/storage/version.txt). You
  9. have two different options for using this script: it can be run it manually any time you
  10. want to check for an update, or you can place it in a crontab to have it run on a set
  11. schedule. The important commands all output to stdout, so you can direct to a logfile if
  12. you so choose.
  13.  
  14. With the recent changes in 4.3.0, it will attempt to manually delete the compiled.php
  15. located in /bootstrap/cache/ under your Invoice Ninja directory. If the file is not there,
  16. it will move on (needed for updating from versions < 4.3.0).
  17.  
  18. Please note that this DOES NOT backup the MySQL database. If you would like to backup the
  19. database, consider running mysqldump on a similar schedule.
  20.  
  21. This script makes a couple assumptions in order to be completely hands-off.
  22.  
  23. 1. You have locate installed.
  24.  
  25. 2. You have ONLY ONE copy Invoice Ninja installed on your system (see below).
  26.  
  27. 3. You have sudo access, either to run manually or to place the script in the root's crontab.
  28. This access is required by the rsync, chown, and chmod commands. It's also required to
  29. remove the downloaded files, which are put in /usr/local/download.
  30.  
  31. 4. The partition containing /usr/local has enough space to store the downloaded ZIP file
  32. along with the extracted files that will be synced to your Invoice Ninja install
  33. location.
  34.  
  35. CAVEATS |
  36. --------+
  37.  
  38. While the script will detect whether or not you are using UPDATE_SECRET in your .env file,
  39. running the update migration commands may not work if UPDATE_SECRET is present, and will
  40. cause wget to return file not found errors.
  41. Re-running wget --spider 'yourninjaurl/update?secret=yoursecret' again or simply
  42. pointing your browser to that URL will successfully complete the migration commands. This
  43. is a known issue, and I'm still trying to figure out what exactly is going on.
  44.  
  45. If you have more than one copy of Invoice Ninja extracted on your system, the script will
  46. cause problems. This is due to using locate to determine where Invoice Ninja is installed.
  47. Make sure that the only copy of the Invoice Ninja directory structure present on your system
  48. is the one the app is actually running from, to prevent locate from setting multiple values
  49. in the $ninja_home variable and causing problems.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement