forked from zendtech/zend-server-php-buildpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.sh
executable file
·32 lines (24 loc) · 1.15 KB
/
boot.sh
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
28
29
30
31
32
#!/usr/bin/env bash
export APACHE_ENVVARS=/app/apache/etc/apache2/envvars
/bin/bash bootstrap.sh
# Start a binary that does nothing so that boot.sh never ends and warden does not kill the container
# This allows apache to be safely restarted by Zend Server (during deploy etc...).
echo "Keep container alive..."
# Keep the app alive so that the health managager does not kill it
eval `cat /app/zend_mysql.sh`
eval `cat /app/zend_cluster.sh`
if [ -n $ZEND_CF_DEBUG ]; then
# Debug info print
hostname
/usr/bin/id
grep uid /app/zend/etc/conf.d/ZendGlobalDirectives.ini
# Debug info
echo /app/nothing $MYSQL_HOSTNAME $MYSQL_PORT $MYSQL_USERNAME $MYSQL_PASSWORD $MYSQL_DBNAME $NODE_ID $WEB_API_KEY $WEB_API_KEY_HASH
# uname system information
uname -a
fi
export LD_LIBRARY_PATH=.
if [ -z $MYSQL_HOSTNAME ] || [ -z $MYSQL_PORT ] || [ -z $MYSQL_USERNAME ] || [ -z $MYSQL_PASSWORD ] || [ -z $MYSQL_DBNAME ] || [ -z $NODE_ID ] || [ -z $WEB_API_KEY ] || [ -z $WEB_API_KEY_HASH ]; then
exec /app/nothing
fi
exec /app/nothing $MYSQL_HOSTNAME $MYSQL_PORT $MYSQL_USERNAME $MYSQL_PASSWORD $MYSQL_DBNAME $NODE_ID $WEB_API_KEY $WEB_API_KEY_HASH