Skip to content

Commit eb84d34

Browse files
committed
rename CRT env to CERTBOT_RUN_INTERVAL
1 parent 5bf3791 commit eb84d34

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

backend/internal/certificate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const omissions = () => {
2323

2424
const internalCertificate = {
2525
allowedSslFiles: ["certificate", "certificate_key"],
26-
intervalTimeout: 1000 * 60 * 60 * Number.parseInt(process.env.CRT, 10),
26+
intervalTimeout: 1000 * 60 * 60 * Number.parseInt(process.env.CERTBOT_RUN_INTERVAL, 10),
2727
interval: null,
2828
intervalProcessing: false,
2929

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ services:
7878
# - "LOGROTATE=true" # Enables writing http access logs to /opt/npmplus/nginx/logs/access.log, stream access logs to /opt/npmplus/nginx/logs/stream.log and enables daily logrotation, default false
7979
# - "LOGROTATIONS=7" # Set how often the access.log should be rotated until it is deleted, default 3
8080
# - "TRUST_CLOUDFLARE=true" # Enables fetching/whitelisting IPs from cloudflare, so nginx will see the real client IPs, default false
81-
# - "CRT=72" # Set how many hours should be between certbot trying to renew your certs, default 3
81+
# - "CERTBOT_RUN_INTERVAL=72" # Set how many hours should be between certbot trying to renew your certs if needed, default 3
8282
# - "ECH_ROTATION_INTERVAL=3" # Set how many hours should be between the runs of your ech cron script, default 1
8383
# - "GOA=true" # Enables goaccess (and overrides LOGROTATE to true), default false --- if you download the GeoLite2-Country.mmdb, GeoLite2-City.mmdb AND GeoLite2-ASN.mmdb file from MaxMind and place them in /opt/npmplus/goaccess/geoip it will automatically enable GeoIP in goaccess after restarting NPMplus (no need to change GOACLA below), you may also enable the geoipupdate container below (please change the timezone)
8484
# - "GOACLA=--agent-list --real-os --double-decode --anonymize-ip --anonymize-level=2 --keep-last=7 --with-output-resolver --no-query-string" # Arguments that should be passed to goaccess, default: --agent-list --real-os --double-decode --anonymize-ip --anonymize-level=1 --keep-last=30 --with-output-resolver --no-query-string

rootfs/usr/local/bin/envs.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export DISABLE_NGINX_BEAUTIFIER="${DISABLE_NGINX_BEAUTIFIER:-false}"
113113
export TRUST_CLOUDFLARE="${TRUST_CLOUDFLARE:-false}"
114114
export LOGROTATE="${LOGROTATE:-false}"
115115
export LOGROTATIONS="${LOGROTATIONS:-3}"
116-
export CRT="${CRT:-3}"
116+
export CERTBOT_RUN_INTERVAL="${CERTBOT_RUN_INTERVAL:-3}"
117117
export ECH_ROTATION_INTERVAL="${ECH_ROTATION_INTERVAL:-1}"
118118
export GOA="${GOA:-false}"
119119
export GOACLA="${GOACLA:-"--agent-list --real-os --double-decode --anonymize-ip --anonymize-level=1 --keep-last=30 --with-output-resolver --no-query-string"}"
@@ -226,6 +226,12 @@ if [ -n "$SKIP_IP_RANGES" ]; then
226226
sleep inf
227227
fi
228228

229+
#tmp
230+
if [ -n "$CRT" ]; then
231+
echo "CRT env is not supported anymore, please use CERTBOT_RUN_INTERVAL"
232+
sleep inf
233+
fi
234+
229235

230236
#upstream
231237
if [ -n "$DISABLE_RESOLVER" ]; then
@@ -517,8 +523,8 @@ if [ -n "$LOGROTATIONS" ] && ! echo "$LOGROTATIONS" | grep -q "^[0-9]\+$"; then
517523
sleep inf
518524
fi
519525

520-
if ! echo "$CRT" | grep -q "^[0-9]\+$"; then
521-
echo "CRT needs to be a number."
526+
if ! echo "$CERTBOT_RUN_INTERVAL" | grep -q "^[0-9]\+$"; then
527+
echo "CERTBOT_RUN_INTERVAL needs to be a number."
522528
sleep inf
523529
fi
524530

0 commit comments

Comments
 (0)