added init script for s1-list_files
[cloudstore.git] / init.d / _start_stop
index a839641..36a37e2 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() {
 
@@ -20,9 +20,14 @@ case $1 in
                fi
                ;;
        stop)  
-               kill `cat /tmp/$NAME.pid` ;;
+               kill `cat /tmp/$NAME.pid`
+               ;;
+       restart)
+               $0 stop
+               $0 start
+               ;;
        *)  
-               echo "usage: $0 {start|stop}" ;;
+               echo "usage: $0 {start|stop|restart}" ;;
        esac
 exit 0