Bug 7844 - sudo with xmlstarlet
[koha.git] / misc / plack / intranet-plack.sh
index fc7a496..2e87659 100755 (executable)
@@ -5,7 +5,7 @@ test ! -z "$1" && site=$1
 dir=`dirname $0`
 
 export KOHA_CONF=/etc/koha/sites/$site/koha-conf.xml 
-export INTRANETDIR="$( xmlstarlet sel -t -v 'yazgfs/config/intranetdir' $KOHA_CONF )"
+export INTRANETDIR="$( sudo -u $site-koha xmlstarlet sel -t -v 'yazgfs/config/intranetdir' $KOHA_CONF )"
 
 if [ ! -e "$INTRANETDIR/C4" ] ; then
        echo "intranetdir in $KOHA_CONF doesn't point to Koha git checkout"