#!/bin/sh
# Arctic Linux - load the packet filter
NAME=nftables
RULES=/etc/nftables.conf
case "${1:-}" in
start)
	[ -f "$RULES" ] || exit 0
	nft -f "$RULES" ;;
stop)
	nft flush ruleset ;;
restart)
	nft flush ruleset; nft -f "$RULES" ;;
status)
	nft list ruleset 2>/dev/null | grep -q 'chain input' ;;
*) echo "usage: $0 start|stop|restart|status" >&2; exit 2 ;;
esac
