代码拉取完成,页面将自动刷新
同步操作将从 xin.chu/nginx-php7-composer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
#########################################################################
# START
# File Name: start.sh
# Author: cccchu
# Email: cccchu@163.com
# Version:
# Created Time: 2018/04/17
#########################################################################
# Add PHP Extension
if [ -f "/data/phpextfile/extension.sh" ]; then
#Add support
yum install -y gcc \
gcc-c++ \
automake \
libtool \
make \
cmake
mkdir -p /home/extension && \
sh /data/phpextfile/extension.sh
mv -f /data/phpextfile/extension.sh /data/phpextfile/extension_back.sh
fi
Nginx_Install_Dir=/usr/local/nginx
DATA_DIR=/data/www
set -e
chown -R www.www $DATA_DIR
ln -s /usr/local/php/bin/php /usr/local/bin
#Add composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
if [[ -n "$PROXY_WEB" ]]; then
[ -f "${Nginx_Install_Dir}/conf/ssl" ] || mkdir -p $Nginx_Install_Dir/conf/ssl
[ -f "${Nginx_Install_Dir}/conf/vhost" ] || mkdir -p $Nginx_Install_Dir/conf/vhost
if [ -z "$PROXY_DOMAIN" ]; then
echo >&2 'error: missing PROXY_DOMAIN'
echo >&2 ' Did you forget to add -e PROXY_DOMAIN=... ?'
exit 1
fi
if [ -z "$PROXY_CRT" ]; then
echo >&2 'error: missing PROXY_CRT'
echo >&2 ' Did you forget to add -e PROXY_CRT=... ?'
exit 1
fi
if [ -z "$PROXY_KEY" ]; then
echo >&2 'error: missing PROXY_KEY'
echo >&2 ' Did you forget to add -e PROXY_KEY=... ?'
exit 1
fi
if [ ! -f "${Nginx_Install_Dir}/conf/ssl/${PROXY_CRT}" ]; then
echo >&2 'error: missing PROXY_CRT'
echo >&2 " You need to put ${PROXY_CRT} in ssl directory"
exit 1
fi
if [ ! -f "${Nginx_Install_Dir}/conf/ssl/${PROXY_KEY}" ]; then
echo >&2 'error: missing PROXY_CSR'
echo >&2 " You need to put ${PROXY_KEY} in ssl directory"
exit 1
fi
fi
/usr/bin/supervisord -n -c /etc/supervisord.conf
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。