Skip to content

Commit

Permalink
fix install.sh, fix issue felixonmars#258
Browse files Browse the repository at this point in the history
  • Loading branch information
xiagw committed Oct 10, 2020
1 parent 1d7f5c0 commit 4821a95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ for _server in "${SERVERS[@]}"; do
for _conf in "${CONF_WITH_SERVERS[@]}"; do
cp "$WORKDIR/$_conf.conf" "/etc/dnsmasq.d/$_conf.$_server.conf"
done

sed -i "s|^\(server.*\)/[^/]*$|\1/$_server|" /etc/dnsmasq.d/*."$_server".conf
if [[ $(uname -s) = Darwin ]] ; then
cmd="sed -i ''"
else
cmd="sed -i"
fi
$cmd "s|^\(server.*\)/[^/]*$|\1/$_server|" /etc/dnsmasq.d/*."$_server".conf
done

echo "Restarting dnsmasq service..."
Expand Down

0 comments on commit 4821a95

Please sign in to comment.