aboutsummarylogtreecommitdiffstats
path: root/nft_geoip.install
blob: ddd6c1ac616ce0b2b9a5bcfa6718a446add1d7ba (plain)
1
2
3
4
5
6
7
8
9
10
sd_booted() {
    [[ -d run/systemd/system && ! -L run/systemd/system ]]
}

post_upgrade() {
    if sd_booted && systemctl -q is-active nftables.service; then
        echo Running GeoIP nft update rules
        echo 'include "/etc/nftables.d/geoip/*.update.nft"' | nft -f -
    fi
}