2017-02-11 12:44:49 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2017-08-08 23:19:39 +02:00
|
|
|
CRONTAB="$(crontab -l)"
|
|
|
|
CRONTAB_ENV=""
|
|
|
|
|
|
|
|
if test -n "$BUNDLE_APP_CONFIG"; then
|
|
|
|
CRONTAB_ENV="${CRONTAB_ENV}BUNDLE_APP_CONFIG=$BUNDLE_APP_CONFIG\n"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$DATABASE_URL"; then
|
|
|
|
CRONTAB_ENV="${CRONTAB_ENV}DATABASE_URL=$DATABASE_URL\n"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$CRONTAB_ENV$CRONTAB" | crontab -
|
|
|
|
|
2017-02-11 12:44:49 +01:00
|
|
|
if [ -f tmp/pids/server.pid ]; then
|
|
|
|
rm tmp/pids/server.pid
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec "$@"
|