source: n4d-dnsmasq/trunk/fuentes/debian/n4d-dnsmasq.postinst @ 196

Last change on this file since 196 was 196, checked in by hectorgh, 5 years ago

adding files

File size: 649 bytes
RevLine 
[196]1#!/bin/sh
2set -e
3# N4D module must be enabled to make more easier
4# the installation process
5n4d-modules enable-plugin /etc/n4d/conf.d/DnsmasqManager
6
7# Get the SRV_IP
8FILE_TO_WATCH="/etc/dnsmasq.conf"
9eval $(n4d-vars getvalues SRV_IP)
10
11if grep -Fq "address=/preseed/mirror/$SRV_IP" $FILE_TO_WATCH
12then
13      sed -i "s/address=\/preseed\/mirror\/$SRV_IP/address=\/preseed\/mirror\/proxy\/server\/$SRV_IP/g" $FILE_TO_WATCH
14fi
15
16if grep -Fq "address=/preseed/mirror/proxy/$SRV_IP" $FILE_TO_WATCH
17then
18      sed -i "s/address=\/preseed\/mirror\/proxy\/$SRV_IP/address=\/preseed\/mirror\/proxy\/server\/$SRV_IP/g" $FILE_TO_WATCH
19fi
20
21#DEBHELPER
22
23exit 0
Note: See TracBrowser for help on using the repository browser.