commit 23a9d646dcc3d86a903997aa7b7331f91c8c5c27
Author: Tse Kit Yam <tsekityam(a)users.noreply.github.com>
Date: Tue Jan 12 22:47:59 2021 +0800
Update contents.lr
1. Reformat the config
No leading spaces in the config provided
2. Fix an error in the *automatically reboot* session
Updating `/etc/apt/apt.conf.d/20auto-upgrades` should be another step, not part of the `/etc/apt/apt.conf.d/50unattended-upgrades`. In Ubuntu 20.04, the `/etc/apt/apt.conf.d/20auto-upgrades` is already created, we can update it without recreating it.
---
.../guard/debianubuntu/updates/contents.lr | 28 ++++++++++++----------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/content/relay-operations/technical-setup/guard/debianubuntu/updates/contents.lr b/content/relay-operations/technical-setup/guard/debianubuntu/updates/contents.lr
index 0506f6c..34bda83 100644
--- a/content/relay-operations/technical-setup/guard/debianubuntu/updates/contents.lr
+++ b/content/relay-operations/technical-setup/guard/debianubuntu/updates/contents.lr
@@ -19,12 +19,12 @@ apt-get install unattended-upgrades apt-listchanges
Put the lines below into the configuration file /etc/apt/apt.conf.d/50unattended-upgrades, everything that was originally inside the generated file can be removed before you add the lines below.
```
- Unattended-Upgrade::Origins-Pattern {
- "origin=Debian,codename=${distro_codename},label=Debian-Security";
- "origin=TorProject";
- };
- Unattended-Upgrade::Package-Blacklist {
- };
+Unattended-Upgrade::Origins-Pattern {
+ "origin=Debian,codename=${distro_codename},label=Debian-Security";
+ "origin=TorProject";
+};
+Unattended-Upgrade::Package-Blacklist {
+};
```
#3. Automatically reboot
@@ -32,14 +32,16 @@ Put the lines below into the configuration file /etc/apt/apt.conf.d/50unattended
If you want to automatically reboot add the following at the the end of the file `/etc/apt/apt.conf.d/50unattended-upgrades`:
```
- Unattended-Upgrade::Automatic-Reboot "true";
+Unattended-Upgrade::Automatic-Reboot "true";
+```
- Create the file /etc/apt/apt.conf.d/20auto-upgrades with the following content
+Update the file `/etc/apt/apt.conf.d/20auto-upgrades` with the following content
- APT::Periodic::Update-Package-Lists "1";
- APT::Periodic::AutocleanInterval "5";
- APT::Periodic::Unattended-Upgrade "1";
- APT::Periodic::Verbose "1";
+```
+APT::Periodic::Update-Package-Lists "1";
+APT::Periodic::AutocleanInterval "5";
+APT::Periodic::Unattended-Upgrade "1";
+APT::Periodic::Verbose "1";
```
# 4. Test
@@ -47,7 +49,7 @@ If you want to automatically reboot add the following at the the end of the file
You can test your unattended-upgrades setup with the following command:
```
- sudo unattended-upgrade -d
+sudo unattended-upgrade -d
```
---
html: two-columns-page.html