slackbuilds_ponce/network/gsd/doinst.sh
Marco Bonetti 9ff19b4705 network/gsd: Added (Greenbone Security Desktop)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2011-02-05 11:43:14 -06:00

14 lines
381 B
Bash

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/openvas/gsd_log.conf.new