mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
armbian: fix mDNS
This commit is contained in:
parent
63f83da6cf
commit
688d6d8c70
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
36
update.sh
36
update.sh
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user