#!/usr/bin/env bash set -e logger "Connect plug!" if [ ! -f "${SNAP_DATA}/settings.conf" ]; then logger "Settings-file is missing" exit 1 else logger "Settings.conf exists, continue plug:configurations" fi snapctl set server.basepath.dir="${SNAP_COMMON}/configurations" snapctl set server.basepath.enforce=True snapctl get server | $SNAP/bin/update-settings "${SNAP_DATA}/settings.conf" update snapctl restart "${SNAP_NAME}.server"