diff options
author | makefu <github@syntax-fehler.de> | 2014-03-24 18:37:24 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-03-24 18:37:24 +0100 |
commit | 416559761c751427c0b4116145575e0965283857 (patch) | |
tree | 138062c852e07ccfc765089319857b36dc1b8d8e /filehooker/root-image/krebs/etc/Reaktor/commands | |
parent | 35d945b9b6222c690a30e70da96daae227d3099b (diff) |
update ftpget to work with list_downloads
Diffstat (limited to 'filehooker/root-image/krebs/etc/Reaktor/commands')
-rwxr-xr-x | filehooker/root-image/krebs/etc/Reaktor/commands/ftpget | 10 |
1 files 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'" |