caddy-control 528 B

123456789101112131415
  1. #!/bin/bash
  2. # Get wekan/mongo settings
  3. source $SNAP/bin/wekan-read-settings
  4. if [ "$CADDY_ENABLED" = "true" ]; then
  5. # Use Caddy 2 command format
  6. # The 'host' option is no longer needed in Caddy 2
  7. # The 'agree' option is no longer needed as Caddy 2 doesn't prompt for EULA
  8. env LC_ALL=C caddy run --config $SNAP_COMMON/Caddyfile
  9. else
  10. echo "caddy is disabled. Stop service"
  11. snapctl stop --disable ${SNAP_NAME}.caddy
  12. # sleep here, in case snapctl fails to stop service so we do not restart too often
  13. fi