diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-05-10 13:26:50 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-05-10 13:33:41 +0300 |
commit | 688d6d8c70dd58911b1bb8a147706425fc195d28 (patch) | |
tree | 1ff70edad9062e0019370bdc0f36e23947153c7c | |
parent | 63f83da6cf26c8b74fdc4117153cd3760b66a9e7 (diff) |
armbian: fix mDNSv0.54.5
-rw-r--r-- | changelog.md | 4 | ||||
-rw-r--r-- | nextcloudplus.sh | 3 | ||||
-rwxr-xr-x | update.sh | 36 |
3 files changed, 12 insertions, 31 deletions
diff --git a/changelog.md b/changelog.md index bdfdafb8..e027562d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ -[v0.54.4](https://github.com/nextcloud/nextcloudpi/commit/36fed66) (2018-05-09) avoid temp dir vulnerabilities +[v0.54.5](https://github.com/nextcloud/nextcloudpi/commit/3f6f865) (2018-05-10) armbian: fix mDNS + +[v0.54.4](https://github.com/nextcloud/nextcloudpi/commit/36f4c6f) (2018-05-09) avoid temp dir vulnerabilities [v0.54.3 ](https://github.com/nextcloud/nextcloudpi/commit/66dfbd0) (2018-05-03) nc-datadir: avoid using occ for faster execution diff --git a/nextcloudplus.sh b/nextcloudplus.sh index 22fb5ad5..278d337a 100644 --- a/nextcloudplus.sh +++ b/nextcloudplus.sh @@ -215,7 +215,8 @@ EOF EOF chmod a+x /etc/update-motd.d/* - ## HOSTNAME + ## HOSTNAME AND mDNS + $APTINSTALL avahi-daemon echo nextcloudplus > /etc/hostname sed -i '$c127.0.1.1 nextcloudplus' /etc/hosts @@ -43,9 +43,6 @@ cp etc/library.sh /usr/local/etc/ source /usr/local/etc/library.sh -# PROVISIONAL renaming from old directory structure -[[ -d /usr/local/etc/nextcloudpi-config.d ]] && mv /usr/local/etc/nextcloudpi-config.d "$CONFDIR" - mkdir -p "$CONFDIR" # prevent installing some apt packages in the docker version @@ -108,36 +105,17 @@ done # not for image builds, only live updates [[ ! -f /.ncp-image ]] && { - # fix updates from NC12 to NC12.0.1 - rm -rf /var/www/nextcloud/.well-known - - # remove .well-known after each renewal - test -d /etc/letsencrypt/live && { - cat > /etc/cron.weekly/letsencrypt-ncp <<EOF -#!/bin/bash -/etc/letsencrypt/certbot-auto renew --quiet -rm -rf /var/www/nextcloud/.well-known -EOF - chmod +x /etc/cron.weekly/letsencrypt-ncp - } - -[[ ! -f /.docker-image ]] && { - # 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" - } - - # Update files after renaming to NCPlus - sed -i 's|NextCloudPi automatically|NextCloudPlus automatically|' /etc/samba/smb.conf - sed -i 's|NextCloudPi autogenerated|NextCloudPlus autogenerated|' /etc/dhcpcd.conf &>/dev/null - sed -i 's|NextCloudPi|NextCloudPlus|' /etc/fail2ban/action.d/sendmail-whois-lines.conf - sed -i 's|nextcloudpi-config.d|ncp-config.d|' /home/www/ncp-launcher.sh - mv /etc/apt/apt.conf.d/20nextcloudpi-upgrades /etc/apt/apt.conf.d/20ncp-upgrades &>/dev/null - # Update btrfs-sync wget -q https://raw.githubusercontent.com/nachoparker/btrfs-sync/master/btrfs-sync -O /usr/local/bin/btrfs-sync chmod +x /usr/local/bin/btrfs-sync + [[ ! -f /.docker-image ]] && { + # install avahi-daemon in armbian images + [[ -f /lib/systemd/system/avahi-daemon.service ]] || { + apt-get update + apt-get install -y --no-install-recommends avahi-daemon + } + } } # end - only live updates exit 0 |