From e6c372115ec8d1553b12a2f4eff554192fa0eedd Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 25 Jun 2026 17:39:14 +0200 Subject: feroxbuster: add doinst.sh to handle .new config file Co-Authored-By: Claude Opus 4.8 --- feroxbuster/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 feroxbuster/doinst.sh (limited to 'feroxbuster/doinst.sh') diff --git a/feroxbuster/doinst.sh b/feroxbuster/doinst.sh new file mode 100644 index 0000000..82fe0c0 --- /dev/null +++ b/feroxbuster/doinst.sh @@ -0,0 +1,14 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/feroxbuster/ferox-config.toml.new -- cgit v1.2.3