From d049baf8a4a55f780673667447dcf6d1d187088f Mon Sep 17 00:00:00 2001 From: celso Date: Fri, 13 Dec 2024 11:27:03 -0300 Subject: [PATCH] Makefile: moved backup to its own target --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e810a36..50f8348 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,11 @@ test: makeconf $(info checking configuration for errors and possible optimizations) nft -c -o -f $(SRC)$(NFT) -install: test +backup: $(info backing up current nftables rules) cp /etc/nftables.conf $(SRC)backup.conf || nft list ruleset > $(SRC)backup.conf + +install: test backup $(info installing new nftables rules) cp $(SRC)$(NFT) /etc/nftables.conf $(info reloading nftables rules)