Skip to content

Commit

Permalink
dnsmasq: improve output
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Nov 25, 2017
1 parent aae2b68 commit 5d7188e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion etc/nextcloudpi-config.d/dnsmasq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ EOF

configure()
{
[[ $ACTIVE_ != "yes" ]] && { service dnsmasq stop; update-rc.d dnsmasq disable; return; }
[[ $ACTIVE_ != "yes" ]] && {
service dnsmasq stop
update-rc.d dnsmasq disable
echo "dnmasq disabled"
return
}

local IFACE=$( ip r | grep "default via" | awk '{ print $5 }' )
local IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
Expand Down Expand Up @@ -80,6 +85,7 @@ EOF
cd /var/www/nextcloud
sudo -u www-data php occ config:system:set trusted_domains 2 --value=$DOMAIN_
sudo -u www-data php occ config:system:set overwrite.cli.url --value=https://$DOMAIN_
echo "dnsmasq enabled"
}

# License
Expand Down

0 comments on commit 5d7188e

Please sign in to comment.