Skip to content

Instantly share code, notes, and snippets.

@rodrigobdz
Last active December 7, 2018 08:40
Show Gist options
  • Save rodrigobdz/18e144380487a24e1f493519ee10f1e7 to your computer and use it in GitHub Desktop.
Save rodrigobdz/18e144380487a24e1f493519ee10f1e7 to your computer and use it in GitHub Desktop.
UPgrade your Raspbian programs via CLI ๐ŸŽˆ
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
set -o errtrace
{
# APT
apt-get update && apt-get upgrade --yes --autoremove
apt-get autoclean
# Raspbian
apt-get dist-upgrade
# Pihole
# Uncomment the following line to update Pihole regularly
#ย pihole updatePihole
exit
}
@rodrigobdz
Copy link
Author

rodrigobdz commented Mar 6, 2018

UP ๐ŸŽˆ

UPgrade your Raspbian programs via CLI

Optional

Usage

  1. Create a file up-raspbian in the /etc/cron.daily/ directory on your Raspbian system
#ย Make script executable
$ sudo touch /etc/cron.daily/up-raspbian
  1. Copy the up-raspbian script to /etc/cron.daily/up-raspbian

  2. Make script executable

$ chmod +x /etc/cron.daily/up-raspbian
  1. up-rasbian will run automatically on a daily schedule ๐ŸŽ‰

Logs

$ grep -i cron /var/log/syslog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment