17 lines
336 B
Bash
Executable file
17 lines
336 B
Bash
Executable file
#!/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;
|