caddy-control 390 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_COMMON/Caddyfile -host=localhost:${CADDY_PORT} -agree
  6. else
  7. echo "caddy is disabled. Stop service"
  8. snapctl stop --disable ${SNAP_NAME}.caddy
  9. # sleep here, in case snapctl fails to stop service so we do not restart too often
  10. fi