fix quota_set output to be single line
[cloudstore.git] / gearman / narada_s1_quota
index cd393b9..114d02c 100755 (executable)
@@ -19,12 +19,12 @@ elif [ "$1" = "set" ] ; then
        while read uid quota ; do
                echo "set $uid $quota" >> $log_file
                setquota -u $uid $quota 0 0 0 /mnt/narada/
-               quota --raw-grace --no-wrap -u $uid | tail -1
+               #quota --raw-grace --no-wrap -u $uid | tail -1
        done
 elif [ "$1" = "start" ] ; then
-       test -e $pid_file && kill `cat $pid_file`
+       test -e $pid_file && kill `cat $pid_file` || true;
        LD_PRELOAD=/mnt/narada/rootfs/usr/lib/libgearman.so.4 /mnt/narada/rootfs/usr/bin/gearman \
-       -h 10.60.0.240 -p 4730 -i $pid_file \
+       -h 10.60.0.244 -p 4730 -i $pid_file \
        -n -f ${name}_${op} -w `pwd`/$0 $op &
 elif [ "$1" = "stop" ] ; then
        kill `cat $pid_file` && rm $pid_file