Skip to content

Commit

Permalink
letsencrypt: switch to apt version
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Apr 30, 2019
1 parent 02efd61 commit b3c7d13
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 63 deletions.
13 changes: 4 additions & 9 deletions bin/ncp/NETWORKING/letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ncdir=/var/www/nextcloud
vhostcfg=/etc/apache2/sites-available/nextcloud.conf
vhostcfg2=/etc/apache2/sites-available/ncp.conf
letsencrypt=/etc/letsencrypt/letsencrypt-auto
letsencrypt=/usr/bin/letsencrypt

is_active()
{
Expand All @@ -22,13 +22,8 @@ install()
{
cd /etc || return 1
apt-get update
apt-get install --no-install-recommends -y python3-minimal
wget -O- --content-disposition https://github.com/letsencrypt/letsencrypt/archive/master/latest.tar.gz \
| tar -xz \
|| exit 1
mv certbot-master letsencrypt
export VIRTUALENV_NO_DOWNLOAD=1 # temporal workaround for https://github.com/certbot/certbot/issues/6682
$letsencrypt --help # do not actually run certbot, only install packages
apt-get install --no-install-recommends -y letsencrypt
rm -f /etc/cron.d/certbot
mkdir -p /etc/letsencrypt/live

[[ "$DOCKERBUILD" == 1 ]] && {
Expand All @@ -46,7 +41,7 @@ EOF
return 0
}

# tested with certbot 0.30.0
# tested with certbot 0.28.0
configure()
{
local DOMAIN_LOWERCASE="${DOMAIN,,}"
Expand Down
8 changes: 6 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@

[v1.11.2](https://github.com/nextcloud/nextcloudpi/commit/25ceed5) (2019-04-06) armbian: fix uu
[v1.11.4](https://github.com/nextcloud/nextcloudpi/commit/62a7f45) (2019-04-28) letsencrypt: switch to apt version

[v1.11.1](https://github.com/nextcloud/nextcloudpi/commit/a712935) (2019-04-05) nc-backup: fix space calculation
[v1.11.3 ](https://github.com/nextcloud/nextcloudpi/commit/71d8f52) (2019-04-09) nc-restore: check btrfs command

[v1.11.2, master](https://github.com/nextcloud/nextcloudpi/commit/3754609) (2019-04-06) armbian: fix uu

[v1.11.1 ](https://github.com/nextcloud/nextcloudpi/commit/a712935) (2019-04-05) nc-backup: fix space calculation

[v1.11.0 ](https://github.com/nextcloud/nextcloudpi/commit/5dedeaf) (2019-04-05) upgrade to NC15.0.6

Expand Down
26 changes: 0 additions & 26 deletions docker-armhf/nextcloudpi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,6 @@ rm /.ncp-image; \
source /usr/local/etc/library.sh; \
find /usr/local/bin/ncp -name '*.sh' | while read l; do cleanup_script $l; done; \

# letsencrypt build artifacts cleanup
apt-get purge -y \
make \
binutils \
cpp \
cpp-6 \
gcc \
gcc-6 \
libasan3 \
libaugeas0 \
libc-dev-bin \
libc6-dev \
libcc1-0 \
libexpat1-dev \
libffi-dev \
libgcc-6-dev \
libisl15 \
libmpc3 \
libubsan0 \
linux-libc-dev \
python-virtualenv \
python-pkg-resources \
python3-pkg-resources \
python3-virtualenv \
virtualenv; \

# should be cleaned up in no-ip.sh, but breaks udiskie.
# safe to do it here since no automount in docker
apt-get purge -y make gcc libc-dev; \
Expand Down
26 changes: 0 additions & 26 deletions docker/nextcloudpi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,6 @@ rm /.ncp-image; \
source /usr/local/etc/library.sh; \
find /usr/local/bin/ncp -name '*.sh' | while read l; do cleanup_script $l; done; \

# letsencrypt build artifacts cleanup
apt-get purge -y \
make \
binutils \
cpp \
cpp-6 \
gcc \
gcc-6 \
libasan3 \
libaugeas0 \
libc-dev-bin \
libc6-dev \
libcc1-0 \
libexpat1-dev \
libffi-dev \
libgcc-6-dev \
libisl15 \
libmpc3 \
libubsan0 \
linux-libc-dev \
python-virtualenv \
python-pkg-resources \
python3-pkg-resources \
python3-virtualenv \
virtualenv; \

# should be cleaned up in no-ip.sh, but breaks udiskie.
# safe to do it here since no automount in docker
apt-get purge -y make gcc libc-dev; \
Expand Down
3 changes: 3 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ EOF
# armbian fix uu
rm -f /etc/apt/apt.conf.d/02-armbian-periodic

# switch back to the apt LE version
which letsencrypt &>/dev/null || install_app letsencrypt

# remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968
# Bug #416 reappeared after we moved to php7.2 and debian buster packages. (keep last)
[[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )"
Expand Down

0 comments on commit b3c7d13

Please sign in to comment.