Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
810cdce
commit 7cdc575
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
#!/bin/bash | ||
|
||
sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade && sudo apt -y autoremove && echo DONE | ||
sudo apt update \ | ||
&& sudo apt -y upgrade \ | ||
&& sudo apt -y dist-upgrade \ | ||
&& sudo apt -y autoremove \ | ||
&& echo DONE | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "ERROR: update did not run successfully" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -e /var/run/reboot-required ]; then | ||
echo | ||
echo "This machine ($HOSTNAME) must be rebooted in order to complete the update process." | ||
echo | ||
echo "*** System restart required ***" | ||
echo | ||
fi |