summaryrefslogtreecommitdiff
path: root/network/siege/doinst.sh
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2013-12-01 22:01:54 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-12-02 00:58:04 -0600
commite1e1b9eeabc174afcec10faaf8896b31cbd1a531 (patch)
treec2489d0eecdbabd3b7ceec8c0d3f91151b709e23 /network/siege/doinst.sh
parent90fc5e953844d8a2ce2d3a3426432bcd2f1f3015 (diff)
downloadslackbuilds-e1e1b9eeabc174afcec10faaf8896b31cbd1a531.tar.gz
network/siege: Updated for version 3.0.5, added a license.
Script cleanup, moved from misc to network Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/siege/doinst.sh')
-rw-r--r--network/siege/doinst.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/network/siege/doinst.sh b/network/siege/doinst.sh
new file mode 100644
index 0000000000..cebc4191d5
--- /dev/null
+++ b/network/siege/doinst.sh
@@ -0,0 +1,16 @@
+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/siege/siegerc.new
+config etc/siege/urls.txt.new
+