os-update.sh gets a reboot option
authorBill Erickson <berickxx@gmail.com>
Tue, 24 May 2016 15:38:24 +0000 (11:38 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/admin-scripts/os-update.sh

index 02f3cba..7174d66 100755 (executable)
@@ -1,6 +1,18 @@
 #!/bin/bash
 # Convenience script for updating packages on debian-based OS'es
+DO_REBOOT=""
 
 apt-get update;
 apt-get -y dist-upgrade;
 apt-get -y autoremove;
+
+echo ""
+echo "--"
+echo "Reboot?  Type 'yes' to continue.  Control-c to exit"
+echo "--"
+
+read DO_REBOOT;
+
+if [ "$DO_REBOOT" = "yes" ]; then
+    reboot;
+fi;