parent
bfcef965df
commit
875a9d2e91
2 changed files with 6 additions and 2 deletions
|
@ -20,7 +20,7 @@ const internalIpRanges = {
|
||||||
iteration_count: 0,
|
iteration_count: 0,
|
||||||
|
|
||||||
initTimer: () => {
|
initTimer: () => {
|
||||||
if (process.env.SKIP_IP_RANGES === false) {
|
if (process.env.SKIP_IP_RANGES === 'false') {
|
||||||
logger.info('IP Ranges Renewal Timer initialized');
|
logger.info('IP Ranges Renewal Timer initialized');
|
||||||
internalIpRanges.interval = setInterval(internalIpRanges.fetch, internalIpRanges.interval_timeout);
|
internalIpRanges.interval = setInterval(internalIpRanges.fetch, internalIpRanges.interval_timeout);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ const internalIpRanges = {
|
||||||
* Triggered at startup and then later by a timer, this will fetch the ip ranges from services and apply them to nginx.
|
* Triggered at startup and then later by a timer, this will fetch the ip ranges from services and apply them to nginx.
|
||||||
*/
|
*/
|
||||||
fetch: () => {
|
fetch: () => {
|
||||||
if (!internalIpRanges.interval_processing && process.env.SKIP_IP_RANGES === false) {
|
if (!internalIpRanges.interval_processing && process.env.SKIP_IP_RANGES === 'false') {
|
||||||
internalIpRanges.interval_processing = true;
|
internalIpRanges.interval_processing = true;
|
||||||
logger.info('Fetching IP Ranges from online services...');
|
logger.info('Fetching IP Ranges from online services...');
|
||||||
|
|
||||||
|
|
|
@ -479,6 +479,10 @@ if [ "$FULLCLEAN" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$SKIP_IP_RANGES" = "true" ]; then
|
||||||
|
rm -vf /data/nginx/ip_ranges.conf
|
||||||
|
fi
|
||||||
|
|
||||||
touch /data/etc/html/index.html \
|
touch /data/etc/html/index.html \
|
||||||
/data/nginx/ip_ranges.conf \
|
/data/nginx/ip_ranges.conf \
|
||||||
/data/nginx/custom/root.conf \
|
/data/nginx/custom/root.conf \
|
||||||
|
|
Loading…
Reference in a new issue