linux:unattended-updates
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:unattended-updates [2018/07/22 15:47] – created Wulf Rajek | linux:unattended-updates [2023/06/05 14:05] (current) – [Initial installation and configuration] Wulf Rajek | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Unattended Updates ====== | ====== Unattended Updates ====== | ||
| + | |||
| + | In order to install updates automatically, | ||
| + | |||
| + | ===== Initial installation and configuration ===== | ||
| < | < | ||
| Line 8: | Line 12: | ||
| vi / | vi / | ||
| #uncomment the desired origin. For only security updates, comment out everything else | #uncomment the desired origin. For only security updates, comment out everything else | ||
| + | Unattended-Upgrade:: | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | |||
| + | //To enable ALL updates, use this: | ||
| + | // " | ||
| + | }; | ||
| + | |||
| #blacklist packages as required (mysql-server, | #blacklist packages as required (mysql-server, | ||
| - | #set mail to whoever should receive it and make sure bsd-mailx or sendmail is installed and able to send mails | + | Unattended-Upgrade:: |
| - | #configure reboot | + | " |
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }; | ||
| + | |||
| + | #Don't force updates | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | #set mail to whoever should receive it and make sure bsd-mailx or sendmail | ||
| + | #is installed and able to send mails | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | #configure reboot | ||
| + | Unattended-Upgrade:: | ||
| </ | </ | ||
| Line 26: | Line 58: | ||
| < | < | ||
| vi / | vi / | ||
| - | 0 */4 * * * root sleep $(( $RANDOM | + | 0 */4 * * * root sleep $(( 1$(date +\%N) \% 14400 )); |
| </ | </ | ||
| + | Test the configuration using: | ||
| + | < | ||
| + | |||
| + | tail / | ||
| + | </ | ||
| + | |||
| + | ===== Additional Repositories ===== | ||
| To include additional repositories, | To include additional repositories, | ||
| Line 54: | Line 93: | ||
| </ | </ | ||
| - | Test the configuration using: | ||
| - | < | ||
| - | tail /var/log/unattended-upgrades/unattended-upgrades.log | + | |
| + | ===== Notify required reboot on login ===== | ||
| + | < | ||
| + | vi /root/.profile | ||
| + | </code> | ||
| + | add after the .bashrc call, but before the mesg line: | ||
| + | < | ||
| + | [ -f /var/ | ||
| </ | </ | ||
| - | To allow unattended upgrades | + | ===== Running on battery ===== |
| + | |||
| + | For unattended-upgrades | ||
| < | < | ||
| - | Unattended-Upgrade:: | + | apt-get install powermgmt-base |
| - | " | + | |
| - | }; | + | |
| </ | </ | ||
linux/unattended-updates.1532270854.txt.gz · Last modified: (external edit)