Skip to content

Commit

Permalink
letsencrypt: ability to disable it and roll back to self-signed certi…
Browse files Browse the repository at this point in the history
…ficates

Signed-off-by: nachoparker <nacho@ownyourbits.com>
  • Loading branch information
nachoparker committed Aug 9, 2021
1 parent 5a05b89 commit b8c1409
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
9 changes: 9 additions & 0 deletions bin/ncp/NETWORKING/letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ EOF
# tested with certbot 0.28.0
configure()
{
[[ "${ACTIVE}" != "yes" ]] && {
rm -rf /etc/letsencrypt/live/*
rm -f /etc/cron.weekly/letsencrypt-ncp
rm -f /etc/letsencrypt/renewal-hooks/deploy/ncp
[[ "$DOCKERBUILD" == 1 ]] && update-rc.d letsencrypt disable
bash /usr/local/etc/ncp-templates/nextcloud.conf.sh > ${nc_vhostcfg}
echo "letsencrypt certificates disabled. Using self-signed certificates instead."
exit 0
}
local DOMAIN_LOWERCASE="${DOMAIN,,}"

[[ "$DOMAIN" == "" ]] && { echo "empty domain"; return 1; }
Expand Down
16 changes: 15 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@

[v1.37.2](https://github.com/nextcloud/nextcloudpi/commit/637ccfe) (2021-07-31) unattended-upgrades: update raspbian origins
[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

[v1.37.8 ](https://github.com/nextcloud/nextcloudpi/commit/5a05b89) (2021-08-08) nextcloud: remove beta option

[v1.37.7 ](https://github.com/nextcloud/nextcloudpi/commit/1d696f0) (2021-08-07) nc-backup-auto.sh: don't smash ncp.log

[v1.37.6 ](https://github.com/nextcloud/nextcloudpi/commit/b840245) (2021-08-03) metrics.sh: Fix inverted is_active result

[v1.37.5 ](https://github.com/nextcloud/nextcloudpi/commit/fb102d2) (2021-08-03) metrics.sh: Fix USER variable being ignored

[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

[v1.37.3 ](https://github.com/nextcloud/nextcloudpi/commit/b8a990e) (2021-08-02) Add ncp-app for prometheus (system) metrics

[v1.37.2](https://github.com/nextcloud/nextcloudpi/commit/4300e30) (2021-07-31) unattended-upgrades: update raspbian origins

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

Expand Down
6 changes: 6 additions & 0 deletions etc/ncp-config.d/letsencrypt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"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",
"infotitle": "Warning",
"params": [
{
"id": "ACTIVE",
"name": "Active",
"value": "no",
"type": "bool"
},
{
"id": "DOMAIN",
"name": "Domain",
Expand Down

0 comments on commit b8c1409

Please sign in to comment.