Skip to content

Commit b8c1409

Browse files
committed
letsencrypt: ability to disable it and roll back to self-signed certificates
Signed-off-by: nachoparker <[email protected]>
1 parent 5a05b89 commit b8c1409

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

bin/ncp/NETWORKING/letsencrypt.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ EOF
5353
# tested with certbot 0.28.0
5454
configure()
5555
{
56+
[[ "${ACTIVE}" != "yes" ]] && {
57+
rm -rf /etc/letsencrypt/live/*
58+
rm -f /etc/cron.weekly/letsencrypt-ncp
59+
rm -f /etc/letsencrypt/renewal-hooks/deploy/ncp
60+
[[ "$DOCKERBUILD" == 1 ]] && update-rc.d letsencrypt disable
61+
bash /usr/local/etc/ncp-templates/nextcloud.conf.sh > ${nc_vhostcfg}
62+
echo "letsencrypt certificates disabled. Using self-signed certificates instead."
63+
exit 0
64+
}
5665
local DOMAIN_LOWERCASE="${DOMAIN,,}"
5766

5867
[[ "$DOMAIN" == "" ]] && { echo "empty domain"; return 1; }

changelog.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11

2-
[v1.37.2](https://github.com/nextcloud/nextcloudpi/commit/637ccfe) (2021-07-31) unattended-upgrades: update raspbian origins
2+
[v1.37.9](https://github.com/nextcloud/nextcloudpi/commit/c08363e) (2021-08-09) letsencrypt: ability to disable it and roll back to self-signed certificates
3+
4+
[v1.37.8 ](https://github.com/nextcloud/nextcloudpi/commit/5a05b89) (2021-08-08) nextcloud: remove beta option
5+
6+
[v1.37.7 ](https://github.com/nextcloud/nextcloudpi/commit/1d696f0) (2021-08-07) nc-backup-auto.sh: don't smash ncp.log
7+
8+
[v1.37.6 ](https://github.com/nextcloud/nextcloudpi/commit/b840245) (2021-08-03) metrics.sh: Fix inverted is_active result
9+
10+
[v1.37.5 ](https://github.com/nextcloud/nextcloudpi/commit/fb102d2) (2021-08-03) metrics.sh: Fix USER variable being ignored
11+
12+
[v1.37.4 ](https://github.com/nextcloud/nextcloudpi/commit/e492032) (2021-08-02) nextcloud.conf.sh: Allow any user name for metrics endpoint and fix docker build
13+
14+
[v1.37.3 ](https://github.com/nextcloud/nextcloudpi/commit/b8a990e) (2021-08-02) Add ncp-app for prometheus (system) metrics
15+
16+
[v1.37.2](https://github.com/nextcloud/nextcloudpi/commit/4300e30) (2021-07-31) unattended-upgrades: update raspbian origins
317

418
[v1.37.1 ](https://github.com/nextcloud/nextcloudpi/commit/b1ffd70) (2021-07-06) ncp-app: bump to NC21
519

etc/ncp-config.d/letsencrypt.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"info": "Internet access is required for this configuration to complete\nBoth ports 80 and 443 need to be accessible from the internet\n\nYour certificate will be automatically renewed every month",
77
"infotitle": "Warning",
88
"params": [
9+
{
10+
"id": "ACTIVE",
11+
"name": "Active",
12+
"value": "no",
13+
"type": "bool"
14+
},
915
{
1016
"id": "DOMAIN",
1117
"name": "Domain",

0 commit comments

Comments
 (0)