cluster-deployment/jobs/update-system/update-system.sh

18 lines
336 B
Bash
Raw Normal View History

#!/usr/bin/env bash
log_msg() {
echo -e "[ ${HOSTNAME} ] [ $(date -u +"%Y-%m-%dT%H:%M:%SZ") ] $@" >&2;
}
log_msg "Starting update";
sudo apt-get update;
log_msg "Starting upgrade";
sudo apt-get dist-upgrade --yes;
log_msg "Starting autoremove";
sudo apt-get autoremove --yes;
log_msg "Starting autoclean";
sudo apt-get autoclean;