You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
632 B
Bash
22 lines
632 B
Bash
#!/bin/sh
|
|
|
|
#####################################################################
|
|
# usage:
|
|
# sh reload.sh -- reload application @dev
|
|
# sh reload.sh ${env} -- reload application @${env}
|
|
|
|
# examples:
|
|
# sh reload.sh prod -- use conf/nginx-prod.conf to reload OpenResty
|
|
# sh reload.sh -- use conf/nginx-dev.conf to reload OpenResty
|
|
#####################################################################
|
|
|
|
if [ -n "$1" ];then
|
|
PROFILE="$1"
|
|
else
|
|
PROFILE=dev
|
|
fi
|
|
|
|
mkdir -p logs & mkdir -p tmp
|
|
echo "reload lor application with profile: "${PROFILE}
|
|
/usr/local/openresty/nginx/sbin/nginx -s reload -p `pwd`/ -c conf/nginx-${PROFILE}.conf
|