diff options
Diffstat (limited to 'network/dansguardian/doinst.sh')
-rw-r--r-- | network/dansguardian/doinst.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/network/dansguardian/doinst.sh b/network/dansguardian/doinst.sh new file mode 100644 index 0000000000..70cb2a098c --- /dev/null +++ b/network/dansguardian/doinst.sh @@ -0,0 +1,17 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +# Keep same perms on rc.dansguardian.new: +if [ -e etc/rc.d/rc.dansguardian ]; then + cp -a etc/rc.d/rc.dansguardian etc/rc.d/rc.dansguardian.new.incoming + cat etc/rc.d/rc.dansguardian.new > etc/rc.d/rc.dansguardian.new.incoming + mv etc/rc.d/rc.dansguardian.new.incoming etc/rc.d/rc.dansguardian.new +fi + |