summaryrefslogtreecommitdiff
path: root/system/slackyd/doinst.sh
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-08 10:55:41 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-08 17:28:33 -0500
commitf4e6a0b62818a787eec9c1637de246979e6fb942 (patch)
tree183ead636186ba223b8154244495294f4007ac55 /system/slackyd/doinst.sh
parent7316445ee3cd818b6974b881cf53a30e02a4f3a9 (diff)
downloadslackbuilds-f4e6a0b62818a787eec9c1637de246979e6fb942.tar.gz
system/slackyd: Added (slacky downloader).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/slackyd/doinst.sh')
-rw-r--r--system/slackyd/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/slackyd/doinst.sh b/system/slackyd/doinst.sh
new file mode 100644
index 0000000000..455e41c588
--- /dev/null
+++ b/system/slackyd/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/slackyd/slackyd.conf.new