... | @@ -6,7 +6,7 @@ root: admin1@domain.net, admin2@domain.net, admin3@domain.net |
... | @@ -6,7 +6,7 @@ root: admin1@domain.net, admin2@domain.net, admin3@domain.net |
|
```
|
|
```
|
|
|
|
|
|
**WHY:**
|
|
**WHY:**
|
|
The server sends emails for the security updates* that have been installed overnight and inform the sysadmins if a reboot is necessary.
|
|
The server sends emails for the security updates that have been installed overnight and inform the sysadmins if a reboot is necessary.
|
|
|
|
|
|
**REQUIRES:**
|
|
**REQUIRES:**
|
|
that we have enabled unattended updates, see how-to:
|
|
that we have enabled unattended updates, see how-to:
|
... | @@ -16,6 +16,10 @@ https://wiki.debian.org/UnattendedUpgrades |
... | @@ -16,6 +16,10 @@ https://wiki.debian.org/UnattendedUpgrades |
|
In order to receive the latest Debian security advisories, subscribe to the [debian-security-announce](https://lists.debian.org/debian-security-announce/) mailing list.
|
|
In order to receive the latest Debian security advisories, subscribe to the [debian-security-announce](https://lists.debian.org/debian-security-announce/) mailing list.
|
|
|
|
|
|
## Server reboot
|
|
## Server reboot
|
|
|
|
**PREPARATIONS:**
|
|
|
|
Inform the community that a reboot would take place and who wants to join, preferably do it with a fellow sysadmin rather than alone.
|
|
|
|
|
|
|
|
**COMMANDS**
|
|
List and save all services currently running in a file with a timestamp in the name, before and after the reboot:
|
|
List and save all services currently running in a file with a timestamp in the name, before and after the reboot:
|
|
```
|
|
```
|
|
# systemctl list-units --type=service --state=running > DD-MM-YY-beforeboot
|
|
# systemctl list-units --type=service --state=running > DD-MM-YY-beforeboot
|
... | @@ -33,6 +37,10 @@ When server is back again, save the list of services and check for differences |
... | @@ -33,6 +37,10 @@ When server is back again, save the list of services and check for differences |
|
# diff service-<timestamp>-beboreboot DD-MM-YY-afterboot > diff-services
|
|
# diff service-<timestamp>-beboreboot DD-MM-YY-afterboot > diff-services
|
|
# less diff-services
|
|
# less diff-services
|
|
```
|
|
```
|
|
|
|
If any service has not started, it would be listed in the diff-services file. Start the service with (example):
|
|
|
|
```
|
|
|
|
# systemctl start apache
|
|
|
|
```
|
|
|
|
|
|
**ALTERNATIVES:**
|
|
**ALTERNATIVES:**
|
|
```
|
|
```
|
... | | ... | |