-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathentrypoint.cron.sh
More file actions
27 lines (19 loc) · 874 Bytes
/
entrypoint.cron.sh
File metadata and controls
27 lines (19 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
php /var/www/html/artisan config:cache
if [[ ! -e /var/www/html/storage/oauth-private.key || ! -e /var/www/html/storage/oauth-public.key ]]; then php /var/www/html/artisan passport:install; fi
#New Relilc
nr_enabled=$(printenv ENABLE_NR);
if [ "$nr_enabled" -eq "1" ]; then
export NR_INSTALL_SILENT=true
export NR_INSTALL_KEY=$(printenv NR_INSTALL_KEY)
export nr_name=$(printenv NR_NAME)
sh /var/www/html/newrelic/newrelic-install install
sed -i -e "s/newrelic.appname =.*/newrelic.appname = \"\Curriki-API-Cron $nr_name\"/" /usr/local/etc/php/conf.d/newrelic.ini
fi
cp -rf /var/www/html/h5pcode/* /var/www/html/storage/app/public/h5p/
chmod 777 -R /var/www/html/storage &
service cron start &
touch /var/www/html/health.ok
php /var/www/html/artisan queue:work --timeout=0 &
apache2ctl -D FOREGROUND
# while true; do sleep 1000000000000; done