photoprism/docker/scripts/dist-upgrade.sh

19 lines
326 B
Bash
Raw Normal View History

2022-02-02 16:31:03 +00:00
#!/usr/bin/env bash
# abort if the user is not root
2022-02-02 16:31:03 +00:00
if [[ $(id -u) != "0" ]]; then
echo "Usage: run dist-upgrade.sh as root" 1>&2
2022-02-02 16:31:03 +00:00
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