photoprism/scripts/dist/dist-upgrade.sh

20 lines
332 B
Bash
Raw Normal View History

2022-02-02 17:31:03 +01:00
#!/usr/bin/env bash
# abort if the user is not root
2022-02-02 17:31:03 +01:00
if [[ $(id -u) != "0" ]]; then
echo "Usage: run ${0##*/} as root" 1>&2
2022-02-02 17:31:03 +01: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
2022-02-18 17:40:58 +01:00
echo "Done."