user_dir=/srv/cloudstore/users/test/
rm -Rvf $user_dir/log/* #$user_dir/blob/*
+RSYNC_LOGIN=u2000
+
push() {
file=`shift`
- RSYNC_PASSWORD=secret rsync $* $file rsync://u2000@127.0.0.1:6501/u2000/localhost/$file
+ RSYNC_PASSWORD=secret rsync $* $file rsync://$RSYNC_LOGIN@127.0.0.1:6501/$RSYNC_LOGIN/localhost/$file
}
pull() {
from=$1
to=$2
test -z "$to" && to=$1
- RSYNC_PASSWORD=secret rsync rsync://u2000@127.0.0.1:6501/u2000/localhost/$from $to
+ RSYNC_PASSWORD=secret rsync rsync://$RSYNC_LOGIN@127.0.0.1:6501/$RSYNC_LOGIN/localhost/$from $to
}
-#./remove-user.sh test@example.com
-
-sudo ./create-user.sh test@example.com secret 200k
-sudo ./create-user.sh test2@example.com secret 20k
+sudo ./remove-user.sh test@example.com
+sudo ./remove-user.sh test2@example.com
-#./remove-user.sh u2001
-#./create-user.sh u2001 secret
+RSYNC_LOGIN=`sudo ./create-user.sh test@example.com secret 200k`
+RSYNC_LOGIN2=`sudo ./create-user.sh test2@example.com secret 20k`
dir=/tmp/test
rm -Rf "$dir"
# test send
-ps ax >> sent-to-test2
-push sent-to-test2 # must be done before first send
+ps ax >> sent-to-$RSYNC_LOGIN2
+push sent-to-$RSYNC_LOGIN2 # must be done before first send
-mkdir -p .send/test2/received
-ln -s ../../../sent-to-test2 .send/test2/received/new-name
+mkdir -p .send/$RSYNC_LOGIN2/received
+ln -s ../../../sent-to-$RSYNC_LOGIN2 .send/$RSYNC_LOGIN2/received/new-name
push .send -rvl
-
-tail -20 $user_dir/log/*
-
-#diff -urw $user_dir/blob $dir/
-#diff -urw $user_dir/json $dir/
-
-ls -al $user_dir/blob