No nginx configuration for FreeBSD
This commit is contained in:
		
							parent
							
								
									064326e4ea
								
							
						
					
					
						commit
						d04ef6209c
					
				@ -1770,24 +1770,32 @@ _EOF_
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
##### nginx
 | 
					##### nginx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "[*] Adding Nginx configuration"
 | 
					case $OS in
 | 
				
			||||||
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/nginx/nginx.conf" "${NGINX_CONFIGURATION}"
 | 
					
 | 
				
			||||||
mkdir -p /var/cache/nginx/services /var/cache/nginx/api
 | 
					    FreeBSD)
 | 
				
			||||||
chown ${NGINX_USER}: /var/cache/nginx/services /var/cache/nginx/api
 | 
					    ;;
 | 
				
			||||||
ln -s /mempool/mempool /etc/nginx/mempool
 | 
					
 | 
				
			||||||
osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_USER__!${NGINX_USER}!" "${NGINX_CONFIGURATION}"
 | 
					Debian)
 | 
				
			||||||
osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_ETC_FOLDER__!${NGINX_ETC_FOLDER}!" "${NGINX_CONFIGURATION}"
 | 
					        echo "[*] Adding Nginx configuration"
 | 
				
			||||||
if [ "${TOR_INSTALL}" = ON ];then
 | 
					        osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/nginx/nginx.conf" "${NGINX_CONFIGURATION}"
 | 
				
			||||||
echo "[*] Read tor v3 onion hostnames"
 | 
					        mkdir -p /var/cache/nginx/services /var/cache/nginx/api
 | 
				
			||||||
    NGINX_MEMPOOL_ONION=$(cat "${TOR_RESOURCES}/mempool/hostname")
 | 
					        chown ${NGINX_USER}: /var/cache/nginx/services /var/cache/nginx/api
 | 
				
			||||||
    NGINX_BISQ_ONION=$(cat "${TOR_RESOURCES}/bisq/hostname")
 | 
					        ln -s /mempool/mempool /etc/nginx/mempool
 | 
				
			||||||
    NGINX_LIQUID_ONION=$(cat "${TOR_RESOURCES}/liquid/hostname")
 | 
					        osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_USER__!${NGINX_USER}!" "${NGINX_CONFIGURATION}"
 | 
				
			||||||
    osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_MEMPOOL_ONION__!${NGINX_MEMPOOL_ONION%.onion}!" "${NGINX_CONFIGURATION}"
 | 
					        osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_ETC_FOLDER__!${NGINX_ETC_FOLDER}!" "${NGINX_CONFIGURATION}"
 | 
				
			||||||
    osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_BISQ_ONION__!${NGINX_BISQ_ONION%.onion}!" "${NGINX_CONFIGURATION}"
 | 
					        if [ "${TOR_INSTALL}" = ON ];then
 | 
				
			||||||
    osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_LIQUID_ONION__!${NGINX_LIQUID_ONIONi%.onion}!" "${NGINX_CONFIGURATION}"
 | 
					        echo "[*] Read tor v3 onion hostnames"
 | 
				
			||||||
fi
 | 
					            NGINX_MEMPOOL_ONION=$(cat "${TOR_RESOURCES}/mempool/hostname")
 | 
				
			||||||
echo "[*] Restarting Nginx"
 | 
					            NGINX_BISQ_ONION=$(cat "${TOR_RESOURCES}/bisq/hostname")
 | 
				
			||||||
osSudo "${ROOT_USER}" service nginx restart
 | 
					            NGINX_LIQUID_ONION=$(cat "${TOR_RESOURCES}/liquid/hostname")
 | 
				
			||||||
 | 
					            osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_MEMPOOL_ONION__!${NGINX_MEMPOOL_ONION%.onion}!" "${NGINX_CONFIGURATION}"
 | 
				
			||||||
 | 
					            osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_BISQ_ONION__!${NGINX_BISQ_ONION%.onion}!" "${NGINX_CONFIGURATION}"
 | 
				
			||||||
 | 
					            osSudo "${ROOT_USER}" sed -i.orig "s!__NGINX_LIQUID_ONION__!${NGINX_LIQUID_ONIONi%.onion}!" "${NGINX_CONFIGURATION}"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					        echo "[*] Restarting Nginx"
 | 
				
			||||||
 | 
					        osSudo "${ROOT_USER}" service nginx restart
 | 
				
			||||||
 | 
					    ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##### OS systemd
 | 
					##### OS systemd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user