diff options
author | Steven King <kingrst@gmail.com> | 2010-11-27 23:35:39 -0600 |
---|---|---|
committer | Heinz Wiesinger <pprkut@slackbuilds.org> | 2010-11-29 12:45:56 +0100 |
commit | 5cce8befbc806b5511dfc3b8936d32aa67747934 (patch) | |
tree | d7953be9a8a494480150d985367f499ef2d69446 /network/csync/doinst.sh | |
parent | 31ececa12a18aeb26c845ac9a5ec01296f14172b (diff) | |
download | slackbuilds-5cce8befbc806b5511dfc3b8936d32aa67747934.tar.gz |
network/csync: Added (file synchronizer)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/csync/doinst.sh')
-rw-r--r-- | network/csync/doinst.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/network/csync/doinst.sh b/network/csync/doinst.sh new file mode 100644 index 0000000000..c9db1e8558 --- /dev/null +++ b/network/csync/doinst.sh @@ -0,0 +1,17 @@ +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/csync/csync_exclude.conf +config etc/csync/csync.conf +config etc/csync/csync_log.conf + |