caddy-control 349 B

123456789101112
  1. #!/bin/bash
  2. # get wekan/mongo settings
  3. source $SNAP/bin/wekan-read-settings
  4. if [ "$CADDY_ENABLED" = "true" ]; then
  5. env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile -host=localhost:${CADDY_PORT}
  6. else
  7. snapctl stop caddy-service 2>&1 || true
  8. # sleep here, in case snapctl fails to stop service so we do not restart too often
  9. sleep 60
  10. fi