Subversion Repositories ALCASAR

Rev

Rev 2744 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2744 Rev 2745
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2744 2019-07-28 09:29:15Z rexy $
2
#  $Id: alcasar.sh 2745 2019-07-28 22:11:33Z rexy $
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
#  team@alcasar.net
7
#  team@alcasar.net
Line 1589... Line 1589...
1589
ipset=/#/wl_ip_allowed  # dynamically add the resolv IP address in the Firewall rules
1589
ipset=/#/wl_ip_allowed  # dynamically add the resolv IP address in the Firewall rules
1590
server=$DNS1
1590
server=$DNS1
1591
server=$DNS2
1591
server=$DNS2
1592
EOF
1592
EOF
1593
        # Create dnsmasq-whitelist unit
1593
        # Create dnsmasq-whitelist unit
1594
        if [ "$mode" != "update" ]
-
 
1595
        then
-
 
1596
        mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/dnsmasq.service.default
1594
        mv /lib/systemd/system/dnsmasq.service /lib/systemd/system/dnsmasq.service.default
1597
    fi
-
 
1598
        cp /lib/systemd/system/dnsmasq.service.default /lib/systemd/system/dnsmasq-whitelist.service
1595
        cp /lib/systemd/system/dnsmasq.service.default /lib/systemd/system/dnsmasq-whitelist.service
1599
        $SED "s?^ExecStart=.*?ExecStart=/usr/sbin/dnsmasq -C /etc/dnsmasq-whitelist.conf?g" /lib/systemd/system/dnsmasq-whitelist.service
1596
        $SED "s?^ExecStart=.*?ExecStart=/usr/sbin/dnsmasq -C /etc/dnsmasq-whitelist.conf?g" /lib/systemd/system/dnsmasq-whitelist.service
1600
        $SED "s?^PIDFile=.*?PIDFile=/var/run/dnsmasq-whitelist.pid?g" /lib/systemd/system/dnsmasq-whitelist.service
1597
        $SED "s?^PIDFile=.*?PIDFile=/var/run/dnsmasq-whitelist.pid?g" /lib/systemd/system/dnsmasq-whitelist.service
1601
} # End of dnsmasq()
1598
} # End of dnsmasq()
1602
 
1599