fix ZSLICE exported to scripts
[cloudstore.git] / init.d / _start_stop
index be4b97a..cf20f39 100755 (executable)
@@ -5,7 +5,7 @@ NAME=`basename $0`
 # generate ZSLICE and SLICE from group name
 export SLICE_GROUP=`echo $NAME | cut -d\- -f1`
 export SLICE=`grep $SLICE_GROUP /var/lib/extrausers/group | cut -d: -f2`
-export ZSLICE=`echo $SLICE | sed 's;^;;'`
+export ZSLICE=`echo $SLICE | sed 's;^/;;'`
 
 _start_stop() {
 
@@ -13,7 +13,7 @@ case $1 in
        start)
                cd /srv/cloudstore
                if [ "$BACKGROUND" -eq 1 ] ; then
-                       ( $DAEMON 2>&1 ) >> /tmp/$NAME.log &
+                       ( $DAEMON 2>&1 ) >> $SLICE/log/$NAME.log &
                        echo $! > /tmp/$NAME.pid
                else
                        $DAEMON