diff options
author | Eric Hameleers <alien@slackware.com> | 2010-09-16 14:55:59 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2010-09-16 14:55:59 +0000 |
commit | 1bd4577084e7103628b5f55ad1fc1490f9c49cda (patch) | |
tree | af155e5b81d31fef485791691863f110bc8c94e1 /icecast | |
parent | 4689efe12b4da8278cd9254100bebb54109191a5 (diff) | |
download | asb-1bd4577084e7103628b5f55ad1fc1490f9c49cda.tar.gz asb-1bd4577084e7103628b5f55ad1fc1490f9c49cda.tar.xz |
Forgot to also protect /etc/icecast
Diffstat (limited to 'icecast')
-rwxr-xr-x | icecast/build/icecast.SlackBuild | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/icecast/build/icecast.SlackBuild b/icecast/build/icecast.SlackBuild index b1dc557f..57fe7901 100755 --- a/icecast/build/icecast.SlackBuild +++ b/icecast/build/icecast.SlackBuild @@ -172,6 +172,10 @@ cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} cd ${PRGNAM}-${VERSION} + +# Fix the document directory: +sed -i -e 's/^docdir .*/docdir = @docdir@/' $(grep -lr Makefile.in .) + chown -R root:root . chmod -R u+w,go+r-w,a+X-s . @@ -214,11 +218,11 @@ cat <<EOINS >> $PKG/install/doinst.sh config() { for infile in \$1; do NEW="\$infile" - OLD="\$(dirname \$NEW\)/\$(basename \$NEW .new\)" + 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 + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy rm \$NEW fi @@ -242,9 +246,10 @@ preserve_perms etc/rc.d/rc.icecast.new # Only way to create and use the correct uid and gid on the target system, # is to use chroot: -# Add the '${icegroup}' group if it doesn't exist already. chroot . <<EOR 2>/dev/null +# Add the '${icegroup}' group if it doesn't exist already. /usr/sbin/groupadd ${icegroup} 2> /dev/null + # Add the '${iceuser}' user if it doesn't exist already /usr/sbin/useradd -c "Icecast" -d /usr/share/icecast \\ -g ${icegroup} -s "/bin/false" ${iceuser} 2> /dev/null @@ -253,9 +258,14 @@ chroot . <<EOR 2>/dev/null chown -R ${iceuser}:${icegroup} usr/share/icecast chmod 750 usr/share/icecast +# Configure the conf directory +chown -R ${iceuser}:${icegroup} etc/icecast +chmod 750 etc/icecast + # Configure the log directory chown -R ${iceuser} var/log/icecast chmod 750 var/log/icecast +EOR # # Update rc.local so that Icecast will be started on boot |