photoprism/docker/scripts/dist-upgrade.sh
2022-02-02 17:31:03 +01:00

18 lines
310 B
Bash
Executable file

#!/usr/bin/env bash
# check if user is root
if [[ $(id -u) != "0" ]]; then
echo "failed, please run as root" 1>&2
exit 1
fi
# fail on errors
set -eu
# disable user interactions
export DEBIAN_FRONTEND="noninteractive"
export TMPDIR="/tmp"
apt-get -y update
apt-get -y dist-upgrade
apt-get -y autoremove