#!/bin/sh
# Start DingTalk channel only if credentials are configured.
# When not configured, exits cleanly so supervisord marks it as EXITED (not ERROR).
if [ -z "$DINGTALK_CLIENT_ID" ]; then
  echo "[dingtalk] DINGTALK_CLIENT_ID not set — channel disabled, exiting."
  exit 0
fi
exec node /app/bridge/dist/channels/dingtalk.js
