connect-plug-configurations 473 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. set -e
  3. logger "Connect plug!"
  4. if [ ! -f "${SNAP_DATA}/settings.conf" ]; then
  5. logger "Settings-file is missing"
  6. source "$SNAP/snap/hooks/install"
  7. else
  8. logger "Settings.conf exists, continue plug:configurations"
  9. fi
  10. snapctl set server.basepath.dir="${SNAP_COMMON}/configurations"
  11. snapctl set server.basepath.enforce=True
  12. snapctl get server | $SNAP/bin/update-settings "${SNAP_DATA}/settings.conf" update
  13. snapctl restart "${SNAP_NAME}.server"