Update d2z.sh

This commit is contained in:
tianyu 2015-08-09 10:30:52 +08:00
parent 39632a0581
commit b10911e9b6
1 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,14 @@ ARIA2_RPC=/etc/transmission-daemon/aria2-rpc.sh
export LC_ALL=en_US.UTF-8
while [ -f /tmp/.x2t ]
do
echo "wait other job exit"
sleep 2
done
touch /tmp/.d2t
if [ "$#" -eq 2 ]; then
DIR=$(basename "$2")
OPT="$1"
@ -23,3 +31,6 @@ if [ "$OPT" = "-z" ]; then
else
$ARIA2_RPC "$DIR.zip"
fi
sync
rm /tmp/.d2t