diff options
author | Alan Hicks <alan@lizella.net> | 2010-05-11 20:01:29 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:01:29 +0200 |
commit | a98998a7f9403fdd57d512e2ca848155f5973b57 (patch) | |
tree | 22844bce7626f62cbfada32e9eb4700ce23e77f9 /network/asterisk/doinst.sh | |
parent | e728769016e769f36d650858c932e047268dd315 (diff) | |
download | slackbuilds-a98998a7f9403fdd57d512e2ca848155f5973b57.tar.gz |
network/asterisk: Added to 12.0 repository
Diffstat (limited to 'network/asterisk/doinst.sh')
-rw-r--r-- | network/asterisk/doinst.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/network/asterisk/doinst.sh b/network/asterisk/doinst.sh new file mode 100644 index 0000000000..f413bbd436 --- /dev/null +++ b/network/asterisk/doinst.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +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... +} + +# Keep same perms on rc.asterisk.new: +if [ -e etc/rc.d/rc.asterisk ]; then + cp -a etc/rc.d/rc.asterisk etc/rc.d/rc.asterisk.new.incoming + cat etc/rc.d/rc.asterisk.new > etc/rc.d/rc.asterisk.new.incoming + mv etc/rc.d/rc.asterisk.new.incoming etc/rc.d/rc.asterisk.new +fi + +config etc/rc.d/rc.asterisk.new +config etc/logrotate.d/asterisk.new +config etc/asterisk/asterisk.conf.new +config etc/asterisk/codecs.conf.new +config etc/asterisk/extensions.conf.new +config etc/asterisk/iax.conf.new +config etc/asterisk/indications.conf.new +config etc/asterisk/modules.conf.new +config etc/asterisk/musiconhold.conf.new +config etc/asterisk/sip.conf.new +config etc/asterisk/zapata.conf.new + |