diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2010-11-25 15:51:52 -0600 |
---|---|---|
committer | Heinz Wiesinger <pprkut@slackbuilds.org> | 2010-11-29 12:45:55 +0100 |
commit | 135174bdcbad5aed51bf7306587d01a7c8c57549 (patch) | |
tree | c97db543ad3fc0f99e42fbee8bf51a29024e0371 /network/argus/doinst.sh | |
parent | d96334b47b13b2ca5a1a30a52bae1c9dc6d5686c (diff) | |
download | slackbuilds-135174bdcbad5aed51bf7306587d01a7c8c57549.tar.gz |
network/argus{-clients}: Moved (back) from Development category.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/argus/doinst.sh')
-rw-r--r-- | network/argus/doinst.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/network/argus/doinst.sh b/network/argus/doinst.sh new file mode 100644 index 0000000000..fde57a9702 --- /dev/null +++ b/network/argus/doinst.sh @@ -0,0 +1,27 @@ +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... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.argus.new +config etc/argus.conf.new + |