diff options
author | Antonio Hernández Blas <hba.nihilismus@gmail.com> | 2011-12-22 23:56:54 -0600 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-12-23 14:05:43 -0200 |
commit | f1952461b1ee94cf2b1b96ae764f67beb1d2f2e2 (patch) | |
tree | 576b1b516d0d6d9de7b9a62f183fcb830002c317 /audio/ices-cc/doinst.sh | |
parent | 7bf998ee43c7d4f26d1343053a745531f23c072d (diff) | |
download | slackbuilds-f1952461b1ee94cf2b1b96ae764f67beb1d2f2e2.tar.gz |
audio/ices-cc: Added (primary source client for icecast)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'audio/ices-cc/doinst.sh')
-rw-r--r-- | audio/ices-cc/doinst.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/audio/ices-cc/doinst.sh b/audio/ices-cc/doinst.sh new file mode 100644 index 0000000000..e159d03a89 --- /dev/null +++ b/audio/ices-cc/doinst.sh @@ -0,0 +1,28 @@ +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.ices-cc.new +config etc/ices-cc.conf.new +config etc/modules/ices.py.new +config etc/modules/ices.pm.new +config etc/modules/ices.sh.new |