diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-04-09 21:35:56 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-04-09 21:41:48 +0300 |
commit | 86afa6235501150fefdcf6eb9ef02f55b62aaf21 (patch) | |
tree | abbd9b4a788df4166fbf214f3e104d06fcf19493 | |
parent | 20c0d8098d2ed03ae7e0758c907899c2c7930b6b (diff) |
docker: add updates
-rw-r--r-- | docker-armhf/nextcloudpi/Dockerfile | 1 | ||||
-rwxr-xr-x | docker-common/nextcloudpi/000ncp | 1 | ||||
-rw-r--r-- | docker/nextcloudpi/Dockerfile | 1 | ||||
-rw-r--r-- | etc/nextcloudpi-config.d/nc-notify-updates.sh | 2 | ||||
-rwxr-xr-x | update.sh | 10 |
5 files changed, 6 insertions, 9 deletions
diff --git a/docker-armhf/nextcloudpi/Dockerfile b/docker-armhf/nextcloudpi/Dockerfile index 7b2fe16a..f27316f1 100644 --- a/docker-armhf/nextcloudpi/Dockerfile +++ b/docker-armhf/nextcloudpi/Dockerfile @@ -39,7 +39,6 @@ for script in *.sh; do cleanup_script $script; done; \ apt-get purge -y \ make \ - git \ binutils \ cpp \ cpp-6 \ diff --git a/docker-common/nextcloudpi/000ncp b/docker-common/nextcloudpi/000ncp index f23f0183..0df36769 100755 --- a/docker-common/nextcloudpi/000ncp +++ b/docker-common/nextcloudpi/000ncp @@ -5,5 +5,6 @@ source /usr/local/etc/library.sh # INIT NCP CONFIG (first run) persistent_cfg /usr/local/etc/nextcloudpi-config.d /data/ncp persistent_cfg /etc/services-enabled.d +persistent_cfg /etc/passwd # persist ncp-web password exit 0 diff --git a/docker/nextcloudpi/Dockerfile b/docker/nextcloudpi/Dockerfile index a4662a1c..b0723df6 100644 --- a/docker/nextcloudpi/Dockerfile +++ b/docker/nextcloudpi/Dockerfile @@ -40,7 +40,6 @@ for script in *.sh; do cleanup_script $script; done; \ # letsencrypt build artifacts cleanup apt-get purge -y \ make \ - git \ binutils \ cpp \ cpp-6 \ diff --git a/etc/nextcloudpi-config.d/nc-notify-updates.sh b/etc/nextcloudpi-config.d/nc-notify-updates.sh index a73e225c..f24897d4 100644 --- a/etc/nextcloudpi-config.d/nc-notify-updates.sh +++ b/etc/nextcloudpi-config.d/nc-notify-updates.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Install the latest News third party app +# Use NC notifications to warn about NCP updates # # Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com> # GPL licensed (see end of file) * Use at your own risk! @@ -48,12 +48,6 @@ nc-scan-auto.sh freeDNS.sh " -# TODO think about updates -EXCL_DOCKER+=" -nc-update.sh -nc-autoupdate-ncp.sh -" - # check running apt pgrep apt &>/dev/null && { echo "apt is currently running. Try again later"; exit 1; } @@ -126,6 +120,7 @@ done mkdir -p /var/log/redis chown redis /var/log/redis +[[ "$DOCKERBUILD" != 1 ]] && { # improve dependency of database with automount sed -i 's|^ExecStartPre=/bin/sleep .*|ExecStartPre=/bin/sleep 20|' /lib/systemd/system/mariadb.service sed -i 's|^Restart=.*|Restart=on-failure|' /lib/systemd/system/mariadb.service @@ -155,6 +150,7 @@ ls -d /media/* &>/dev/null && { } EOF chmod +x /usr/local/etc/nc-automount-links +} # fix updates from NC12 to NC12.0.1 rm -rf /var/www/nextcloud/.well-known @@ -169,6 +165,7 @@ EOF chmod +x /etc/cron.weekly/letsencrypt-ncp } +[[ "$DOCKERBUILD" != 1 ]] && { # disable ramlogs if accidentally enabled grep -q '^ACTIVE_=yes$' "$CONFDIR"/nc-ramlogs.sh || { systemctl disable log2ram @@ -178,6 +175,7 @@ EOF # remove directories left from unclean shutdown UNIT=/usr/lib/systemd/system/nc-automount.service grep -q rmdir "$UNIT" || sed -i '/^ExecStart=/iExecStartPre=/bin/bash -c "rmdir /media/* || true"' "$UNIT" + } } # end - only live updates |