#!/bin/bash SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink TARGET="$(readlink "$SOURCE")" if [[ $TARGET == /* ]]; then SOURCE="$TARGET" else DIR="$( dirname "$SOURCE" )" SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located fi done SRPATH="$( dirname "$SOURCE" )" SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" if [ "$SFPATH" != "$SRPATH" ]; then RDIR=$SRPATH # relativ path directory fi cwdir=$PWD wdir=$SFPATH docker-compose down docker-compose rm docker container rm jitsiprosody jitsiweb jitsijicofo jitsijvb docker-compose pull cd $wdir cp -f env .env ./create-config.sh ./gen-passwords.sh cd $cwdir docker-compose up -d