2017-01-12 13:14:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ "$1" = 'zammad-scheduler' ]; then
|
2017-03-08 18:37:05 +00:00
|
|
|
# wait for zammad process coming up
|
2017-03-10 08:48:09 +00:00
|
|
|
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
|
|
|
|
echo "scheduler waiting for zammads railsserver to be ready..."
|
2017-03-08 18:37:05 +00:00
|
|
|
sleep 2
|
|
|
|
done
|
2017-01-12 13:14:25 +00:00
|
|
|
|
2017-03-08 18:37:05 +00:00
|
|
|
# start scheduler
|
|
|
|
cd ${ZAMMAD_DIR}
|
|
|
|
bundle exec script/scheduler.rb run
|
2017-01-12 13:14:25 +00:00
|
|
|
fi
|