Add git, neofetch, replace iptables with nftables, setup /etc/sysctl.conf

This commit is contained in:
markmental 2026-09-11 00:34:18 -04:00
commit 8202f22735
5 changed files with 133 additions and 18 deletions

View file

@ -0,0 +1,49 @@
#!/bin/sh
#
# Load the nftables firewall ruleset from /etc/nftables.conf.
DAEMON="nft"
CONF="/etc/nftables.conf"
start() {
printf 'Loading nftables firewall: '
if ! [ -f "$CONF" ]; then
echo "MISSING $CONF"
return 1
fi
"$DAEMON" -f "$CONF"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Flushing nftables ruleset: '
"$DAEMON" flush ruleset
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac