postinst 676 Bytes
Newer Older
Steve Kemp's avatar
Steve Kemp committed
1
#!/bin/bash
Steve Kemp's avatar
Added  
Steve Kemp committed
2
3
4
5
6
7

set -e

#
# Skip, if we are not in "configure" state
#
8
if [ "$1" != "configure" ]; then
9
  exit 0
10
fi
Steve Kemp's avatar
Added  
Steve Kemp committed
11

12
13
14
#
#  The prefix of our tree.
#
15
PREFIX=/etc/sympl/firewall
16

17
chown -R sympl:sympl $PREFIX
18

19
20
21
# Temp compatibility fix for nftables changes.
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
22

Steve Kemp's avatar
Added  
Steve Kemp committed
23
#DEBHELPER#
24

Paul Cammish's avatar
Paul Cammish committed
25
26
# Remove old incrond support
if [ -f /etc/incron.d/sympl-firewall ]; then
27
28
  rm /etc/incron.d/sympl-firewall
fi
Paul Cammish's avatar
Paul Cammish committed
29
if [ -f /etc/sympl/monit.d/incrond ]; then
30
31
  rm /etc/sympl/monit.d/incrond
fi
Paul Cammish's avatar
Paul Cammish committed
32
33
34
if [ -f /usr/share/sympl/monit/checks/incrond ]; then
  rm /etc/incron.d/sympl-firewall
fi
35

Steve Kemp's avatar
Added  
Steve Kemp committed
36
exit 0