Last active
February 6, 2019 18:07
-
-
Save hyukishi/00f0d196fa92cf88500a27df6235ecee to your computer and use it in GitHub Desktop.
Updates all packages and autoremoves unneeded. Schedules a restart of the box for 5:00 AM.
This file contains hidden or 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
#! /bin/bash | |
# Created by Jeffery Grantham on 2/6/2019 | |
# Checking if "at" is installed. If not, apt-get will install it. | |
if [[ $(which at) != "/usr/bin/at" ]]; then | |
apt-get install at -y | |
fi | |
# Proceeding to check for updates | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y autoremove | |
# Schedule reboot for 5:00 AM | |
echo "/sbin/shutdown -r now" | at 5:00 AM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment