configure 371 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. set -e
  3. logger "Configure snap!"
  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 configure"
  9. fi
  10. snapctl get server | $SNAP/bin/update-settings "${SNAP_DATA}/settings.conf" update
  11. snapctl restart "${SNAP_NAME}.server"
  12. exit $?