diff options
-rw-r--r-- | src/rc.slack-autoupdate | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rc.slack-autoupdate b/src/rc.slack-autoupdate index cb82f09..4e10bdf 100644 --- a/src/rc.slack-autoupdate +++ b/src/rc.slack-autoupdate @@ -9,6 +9,9 @@ export PATH=$PATH:/usr/local/bin:/usr/local/sbin +# Duration in seconds to wait before installing pending updates. +WAIT_TIME=5 + # Where packages are stored pending installation. You can use sub-directories # to order and group packages. PACKAGE_DIR="/var/spool/slack-autoupdate" @@ -19,9 +22,10 @@ if [ -z "$UPDATES" ]; then exit 0 fi -if read -r -t 5 -p "Installing updates, press enter to skip this process..."; then +if read -r -t "$WAIT_TIME" -p "Your system has pending software updates. They will be installed in ${WAIT_TIME} seconds. Press enter to skip..."; then exit 0 fi +echo " proceeding." OLD_KERNEL="$(md5sum /boot/vmlinuz | cut -f1 -d' ')" @@ -41,4 +45,6 @@ fi # This will error out if PACKAGE_DIR is accidentally unset. find "$PACKAGE_DIR" -mindepth 1 | xargs rm -fr +echo "All updates have been installed." + reboot |