Skip to content

Commit

Permalink
apt: Add explaination on how to use 'apt update' correctly + warning
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinCG committed Aug 20, 2021
1 parent 0007d70 commit 7a70f1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/apt.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
* The command `apt-get update` **must** be run before this will report the correct number of
packages. As this will need to be run with super user privaleges, it is recommended that a
simple cron job or timer script be configured for this job.
It is possible to enable it directly by putting 'apt_update_before_check' parameter to true.
Note that you'll then need to grant sudo apt-get rights to www-data:
`sudo visudo`
www-data ALL=(ALL) NOPASSWD: /bin/apt-get
<!> ACTIVATING IT MAY HAVE IMPACT ON SECURITY OF YOUR COMPUTER SO USE IT WITH CAUTION
* The `apt-get` approach is used if the `apt-check` command cannot be found. Most likely, it
means that this script is not running in an Ubuntu environment.
* Basically, this calls and filters 'apt-get --simulate dist-upgrade'. If this call is
Expand Down

0 comments on commit 7a70f1e

Please sign in to comment.