Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-06-18 17:50:17 +0300
committernachoparker <nacho@ownyourbits.com>2018-06-18 18:11:09 +0300
commit9210fb26ef37927486df24649e97e43a49b7b2ea (patch)
treee1b689c64422e8b0a97d4ee5a801419270b889de
parent5aa071e0699e7723231917e06a9a302cbb65affc (diff)
letsencrypt: install from debian packagev0.57.4
-rw-r--r--changelog.md8
-rw-r--r--etc/ncp-config.d/letsencrypt.sh33
-rwxr-xr-xupdate.sh8
3 files changed, 18 insertions, 31 deletions
diff --git a/changelog.md b/changelog.md
index 0e53a766..815514e3 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,11 @@
-[v0.57.2](https://github.com/nextcloud/nextcloudpi/commit/09943a8) (2018-06-18) nc-static-IP: autodetect default interface
+[v0.57.4](https://github.com/nextcloud/nextcloudpi/commit/c00fbce) (2018-06-18) letsencrypt: install from debian package
-[v0.57.1](https://github.com/nextcloud/nextcloudpi/commit/1c3d0c0) (2018-06-18) docker: replace systemd for service
+[v0.57.3](https://github.com/nextcloud/nextcloudpi/commit/a74248b) (2018-06-18) armbian: default to SSH disabled
+
+[v0.57.2 ](https://github.com/nextcloud/nextcloudpi/commit/5479305) (2018-06-18) nc-static-IP: autodetect default interface
+
+[v0.57.1 ](https://github.com/nextcloud/nextcloudpi/commit/97375a1) (2018-06-18) docker: replace systemd for service
[v0.57.0](https://github.com/nextcloud/nextcloudpi/commit/ef5839d) (2018-06-18) update to NC 13.0.4
diff --git a/etc/ncp-config.d/letsencrypt.sh b/etc/ncp-config.d/letsencrypt.sh
index 7c2bb155..b736d25b 100644
--- a/etc/ncp-config.d/letsencrypt.sh
+++ b/etc/ncp-config.d/letsencrypt.sh
@@ -31,12 +31,7 @@ install()
{
cd /etc || return 1
apt-get update
- apt-get install --no-install-recommends -y python2.7-minimal
- wget -O- --content-disposition https://github.com/letsencrypt/letsencrypt/archive/master/latest.tar.gz \
- | tar -xz \
- || exit 1
- mv certbot-master letsencrypt
- /etc/letsencrypt/letsencrypt-auto --help # do not actually run certbot, only install packages
+ apt-get install --no-install-recommends -y letsencrypt
[[ "$DOCKERBUILD" == 1 ]] && {
# execute before lamp stack
@@ -46,21 +41,13 @@ install()
source /usr/local/etc/library.sh
persistent_cfg /etc/letsencrypt
-cat > /etc/cron.weekly/letsencrypt-ncp <<EOFCRON
-#!/bin/bash
-/etc/letsencrypt/certbot-auto renew --quiet
-rm -rf $NCDIR/.well-known
-EOFCRON
-
-chmod +x /etc/cron.weekly/letsencrypt-ncp
-
exit 0
EOF
chmod +x /etc/services-available.d/009letsencrypt
}
}
-# tested with git version v0.11.0-71-g018a304
+# tested with certbot 0.10.2
configure()
{
local DOMAIN_LOWERCASE="${DOMAIN_,,}"
@@ -69,10 +56,10 @@ configure()
sed -i "s|ServerName .*|ServerName $DOMAIN_|" $VHOSTCFG || \
sed -i "/DocumentRoot/aServerName $DOMAIN_" $VHOSTCFG
- /etc/letsencrypt/letsencrypt-auto certonly -n --no-self-upgrade --webroot -w $NCDIR --hsts --agree-tos -m $EMAIL_ -d $DOMAIN_ && {
+ letsencrypt certonly -n --no-self-upgrade --webroot -w $NCDIR --hsts --agree-tos -m $EMAIL_ -d $DOMAIN_ && {
cat > /etc/cron.weekly/letsencrypt-ncp <<EOF
#!/bin/bash
-/etc/letsencrypt/certbot-auto renew --quiet
+/usr/bin/certbot renew --quiet
rm -rf $NCDIR/.well-known
EOF
chmod +x /etc/cron.weekly/letsencrypt-ncp
@@ -99,18 +86,6 @@ EOF
return 1
}
-cleanup()
-{
- apt-get purge -y \
- augeas-lenses \
- libpython-dev \
- libpython2.7-dev \
- libssl-dev \
- python-dev \
- python2.7-dev \
- python-pip-whl
-}
-
# License
#
# This script is free software; you can redistribute it and/or modify it
diff --git a/update.sh b/update.sh
index cfc4fe8a..eaea62b2 100755
--- a/update.sh
+++ b/update.sh
@@ -219,6 +219,14 @@ EOF
activate_script nc-autoupdate-nc.sh
cd - &>/dev/null
}
+
+ # change letsencrypt from git to package based
+ [[ -f /usr/bin/letsencrypt ]] || {
+ echo "updating letsencrypt..."
+ apt-get update
+ apt-get install -y --no-install-recommends letsencrypt
+ }
+
} # end - only live updates
exit 0