From 416559761c751427c0b4116145575e0965283857 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 24 Mar 2014 18:37:24 +0100 Subject: update ftpget to work with list_downloads --- filehooker/root-image/krebs/etc/Reaktor/commands/ftpget | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget b/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget index a0340354..10e73a2f 100755 --- a/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget +++ b/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget @@ -16,5 +16,11 @@ realshare="/media/$share" test ! -e "$sharepath" && echo "$sharepath does not exist!" && exit 23 sudo -u $ncdc_user /usr/bin/mkdir -p "$realshare" -sudo -u $ncdc_user /usr/bin/tmux new-window -t dcpp -c "$realshare" "lftpget \"$target\"" -echo "download started" +if ! sudo -u $ncdc_user /usr/bin/tmux has-session -t dl >/dev/null 2>&1 ;then + sudo -u $ncdc_user /usr/bin/tmux new-session -s dl -d -c "$realshare" "lftpget \"$target\"" +else + sudo -u $ncdc_user /usr/bin/tmux new-window -t dl -c "$realshare" "lftpget \"$target\"" +fi +#sudo -u $ncdc_user /usr/bin/tmux new-window -t dl +#cd "$realshare" ;sudo -u hooker /usr/bin/lftpget "$target" +echo "download started, check with 'list_downloads'" -- cgit v1.2.3