File: iptables-persistent.postrm

package info (click to toggle)
iptables-persistent 1.0.23
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 272 kB
  • sloc: sh: 503; makefile: 20
file content (26 lines) | stat: -rw-r--r-- 502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -e

case "$1" in
purge)
  rm -rf /etc/iptables/rules \
    /etc/iptables/rules.v4 \
    /etc/iptables/rules.v6
  ;;
esac

# To register the drop-in's removal
if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
  systemctl --system daemon-reload >/dev/null || true
fi

if [ -L /etc/systemd/system/iptables.service ]; then
  rm /etc/systemd/system/iptables.service
fi

if [ -L /etc/systemd/system/ip6tables.service ]; then
  rm /etc/systemd/system/ip6tables.service
fi

#DEBHELPER#