zammad-docker-compose/containers/zammad-scheduler/docker-entrypoint.sh

16 lines
416 B
Bash

#!/bin/bash
if [ "$1" = 'zammad-scheduler' ]; then
# wait for zammad process coming up
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
echo "scheduler waiting for zammads railsserver to be ready..."
sleep 2
done
echo "scheduler can access raillsserver now..."
# start scheduler
cd ${ZAMMAD_DIR}
exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec script/scheduler.rb run
fi