Skip to content

Commit 4af9494

Browse files
author
Dexter
committed
copy all configs to /etc/nginx
1 parent b483f99 commit 4af9494

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/libs.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function post_install_nginx() {
172172
mkdir -p ${NGINX}conf.d/
173173
mkdir -p ${NGINX}lua_modules/
174174
# Copy main config file
175-
cp -f ${SCRIPT_PATH}config/nginx/nginx.conf ${NGINX}nginx.conf
175+
cp -f ${SCRIPT_PATH}config/* ${NGINX}
176176
chmod +x ${NGINX}nginx.conf
177177
# Copy lua modules
178178
rm -rf ${NGINX}lua_modules/* && mkdir -p ${NGINX}lua_modules/
@@ -187,14 +187,17 @@ function post_install_nginx() {
187187

188188
# Customize: main /etc/nginx/nginx.conf
189189
# Prepend: number of cores
190-
sed -i -e "1iworker_processes ${CPUS}" ${NGINX}nginx.conf
190+
sed -i -e "1iworker_processes ${CPUS};" ${NGINX}nginx.conf
191191

192192

193193
# Install modules (the ones that don't install via include)
194194
# TODO:: install lua modules (if needed)
195195

196196
# Set init.d service
197197
# TODO:: auto start
198+
199+
# Restart ctl daemon
200+
systemctl daemon-reload
198201
}
199202

200203
function create_installed_file() {

0 commit comments

Comments
 (0)