use SLICE_GROUP
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 11 Feb 2012 16:47:43 +0000 (17:47 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 11 Feb 2012 16:47:43 +0000 (17:47 +0100)
init.d/_start_stop
init.d/s1-rsync-piper

index c712d4d..be4b97a 100755 (executable)
@@ -3,7 +3,7 @@ BACKGROUND=1
 # deduce name from script name
 NAME=`basename $0`
 # generate ZSLICE and SLICE from group name
-SLICE_GROUP=`echo $NAME | cut -d\- -f1`
+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;^;;'`
 
index cc41a26..3de713e 100755 (executable)
@@ -1,8 +1,9 @@
 #!/bin/sh
 
-DAEMON="./rsync-piper.pl s1"
-
 . /srv/cloudstore/init.d/_start_stop
+
+DAEMON="./rsync-piper.pl $SLICE_GROUP"
+
 _start_stop $*