#/bin/bash set -e source $HOME/scripts/env echo "stopping $app..." systemctl stop --user $app echo "restoring database..." # -c drops all objects that are to be restored pg_restore -c -h localhost -U $user -d $db < $dump systemctl start --user $app echo "started $app..." sleep 2 systemctl --no-pager status --user $app echo "setting new demouser password" echo "waiting a crazy amount of 20s so keycloak has time to open that port..." sleep 20 . $HOME/scripts/set-demopw.sh echo "done."