mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-08 06:02:01 -03:30
dnsmasq.sh: Don't fix it if it ain't broken
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
7ed6552110
commit
94332db835
@ -103,7 +103,7 @@ configure()
|
||||
cd /var/www/nextcloud
|
||||
[[ "$BUILD_MODE" == 1 ]] || save_maintenance_mode
|
||||
|
||||
echo "moving data directory from ${SRCDIR} to ${BASEDIR}..."
|
||||
echo "moving data directory from ${SRCDIR} to ${DATADIR}..."
|
||||
|
||||
# use subvolumes, if BTRFS
|
||||
[[ "$(stat -fc%T "${BASEDIR}")" == "btrfs" ]] && ! is_docker && {
|
||||
|
||||
@ -14,30 +14,39 @@ install()
|
||||
set -x
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y dnsmasq
|
||||
sleep 10
|
||||
rc=0
|
||||
service dnsmasq status > /dev/null 2>&1 || rc=$?
|
||||
[[ $rc -eq 3 ]] && ! [[ "$INIT_SYSTEM" =~ ^("chroot"|"unknown")$ ]] && command -v systemd-resolve > /dev/null || {
|
||||
if [[ $rc -eq 3 ]] && ! [[ "$INIT_SYSTEM" =~ ^("chroot"|"unknown")$ ]]
|
||||
then
|
||||
echo "Applying workaround for dnsmasq bug (compare issue #1446)"
|
||||
mkdir -p /etc/systemd/resolved.conf.d
|
||||
if systemctl status systemd-resolved
|
||||
then
|
||||
cat <<EOF > /etc/systemd/resolved.conf.d/nostublistener.conf
|
||||
cat <<EOF > /etc/systemd/resolved.conf.d/nostublistener.conf
|
||||
[Resolve]
|
||||
DNSStubListener=no
|
||||
EOF
|
||||
[[ "$INIT_SYSTEM" != "systemd" ]] || systemctl restart systemd-resolved
|
||||
else
|
||||
elif systemctl status resolvconf
|
||||
then
|
||||
systemctl stop resolvconf
|
||||
systemctl start dnsmasq
|
||||
systemctl status dnsmasq
|
||||
else
|
||||
echo "dnsmasq failed to start and no workaround could be found. This means, the installer failed."
|
||||
false
|
||||
fi
|
||||
# service systemd-resolved stop || true
|
||||
systemctl start dnsmasq
|
||||
systemctl status dnsmasq
|
||||
}
|
||||
fi
|
||||
|
||||
service dnsmasq stop
|
||||
[[ "$INIT_SYSTEM" != "systemd" ]] || systemctl start systemd-resolved || systemctl start resolvconf
|
||||
if [[ "$INIT_SYSTEM" == "systemd" ]] && systemctl list-unit-files resolvconf.service
|
||||
then
|
||||
systemctl start resolvconf
|
||||
fi
|
||||
update-rc.d dnsmasq disable || rm /etc/systemd/system/multi-user.target.wants/dnsmasq.service
|
||||
|
||||
return 0
|
||||
|
||||
@ -74,11 +74,6 @@ cp etc/ncp.cfg /usr/local/etc/
|
||||
|
||||
cp -r etc/ncp-templates /usr/local/etc/
|
||||
install_app lamp.sh
|
||||
if [[ -d "/run/systemd/system" ]] && is_lxc
|
||||
then
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y systemd-resolved
|
||||
systemctl enable systemd-resolved
|
||||
fi
|
||||
install_app bin/ncp/CONFIG/nc-nextcloud.sh
|
||||
run_app_unsafe bin/ncp/CONFIG/nc-nextcloud.sh
|
||||
rm /usr/local/etc/ncp-config.d/nc-nextcloud.cfg # armbian overlay is ro
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user