summaryrefslogtreecommitdiff
path: root/network/openvas-administrator/doinst.sh
diff options
context:
space:
mode:
authorMarco Bonetti <sid77@slackware.it>2010-04-12 19:35:11 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-15 10:37:53 +0200
commita7c3b4f62b40315e6eca57e772f21181d956285f (patch)
treebbf216a260d8cf0bc4fdea3426be09e6b021f0bf /network/openvas-administrator/doinst.sh
parente9a7006cde1ba891e7892d1ff12b25b2cadb8d29 (diff)
downloadslackbuilds-a7c3b4f62b40315e6eca57e772f21181d956285f.tar.gz
network/openvas-administrator: Added (OpenVAS Settings Management)
Diffstat (limited to 'network/openvas-administrator/doinst.sh')
-rw-r--r--network/openvas-administrator/doinst.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/network/openvas-administrator/doinst.sh b/network/openvas-administrator/doinst.sh
new file mode 100644
index 0000000000..7a0957856f
--- /dev/null
+++ b/network/openvas-administrator/doinst.sh
@@ -0,0 +1,22 @@
+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...
+}
+
+# Keep same perms on rc.openvasad.new:
+if [ -e etc/rc.d/rc.openvasad ]; then
+ cp -a etc/rc.d/rc.openvasad etc/rc.d/rc.openvasad.new.incoming
+ cat etc/rc.d/rc.openvasad.new > etc/rc.d/rc.openvasad.new.incoming
+ mv etc/rc.d/rc.openvasad.new.incoming etc/rc.d/rc.openvasad.new
+fi
+
+config etc/rc.d/rc.openvasad.new
+config etc/openvas/openvasad_log.conf.new
+