fix: create mainsail or fluidd nginx config from template

This commit is contained in:
th33xitus
2021-01-28 16:45:12 +01:00
parent 19aed15db0
commit 254e1b8244
3 changed files with 8 additions and 66 deletions

View File

@@ -6,8 +6,9 @@ set_nginx_cfg(){
#execute operations
status_msg "Creating Nginx configuration for $1 ..."
#copy content from resources to the respective nginx config file
cat ${SRCDIR}/kiauh/resources/$1_nginx.cfg > ${SRCDIR}/kiauh/resources/$1
cat ${SRCDIR}/kiauh/resources/klipper_webui_nginx.cfg > ${SRCDIR}/kiauh/resources/$1
##edit the nginx config file before moving it
sed -i "s/<<UI>>/$1/g" ${SRCDIR}/kiauh/resources/$1
if [ "$SET_LISTEN_PORT" != "$DEFAULT_PORT" ]; then
status_msg "Configuring port for $1 ..."
#set listen port ipv4