linux:unattended-updates
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:unattended-updates [2018/07/23 12:28] – 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 9: | Line 13: | ||
#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:: | Unattended-Upgrade:: | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
+ | " | ||
+ | |||
+ | //To enable ALL updates, use this: | ||
+ | // " | ||
}; | }; | ||
Line 28: | Line 36: | ||
#Don't force updates | #Don't force updates | ||
Unattended-Upgrade:: | Unattended-Upgrade:: | ||
- | |||
#set mail to whoever should receive it and make sure bsd-mailx or sendmail | #set mail to whoever should receive it and make sure bsd-mailx or sendmail | ||
Line 36: | Line 43: | ||
#configure reboot if desired. | #configure reboot if desired. | ||
Unattended-Upgrade:: | Unattended-Upgrade:: | ||
- | |||
</ | </ | ||
Line 52: | 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 80: | 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.1532345333.txt.gz · Last modified: (external edit)