User Tools

Site Tools


config:deluge

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
config:deluge [2017/04/27 20:31] – created Wulf Rajekconfig:deluge [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 16: Line 16:
 torrentname=$2 torrentname=$2
 torrentpath=$3 torrentpath=$3
 +logfile="/home/wuff/.deluge/execute_script.log"
  
 if [ -f "$torrentpath/$torrentname" ] if [ -f "$torrentpath/$torrentname" ]
 then then
-        echo "     Torrent is a single file" >> /home/wuff/.deluge/execute_script.log+        echo "     Torrent is a single file" >> $logfile
 else else
-        echo "     Torrent is a folder" >> /home/wuff/.deluge/execute_script.log +        echo "     Torrent is a folder" >> $logfile 
-        #lftp -u $USER,$PASS $HOST -e "mirror -P4 -R \"$torrentpath/$torrentname\" /Storage/UbuntuISO/; quit" &>> /home/wuff/.deluge/execute_script.log+        #lftp -u $USER,$PASS $HOST -e "mirror -P4 -R \"$torrentpath/$torrentname\" /Storage/UbuntuISO/; quit" &>> $logfile
         if [ -f "$torrentpath/$torrentname/RARBG.com.txt" ]         if [ -f "$torrentpath/$torrentname/RARBG.com.txt" ]
         then         then
-                echo "deleting RARBG text file" >> /home/wuff/.deluge/execute_script.log+                echo "deleting RARBG text file" >> $logfile
                 rm $torrentpath/$torrentname/RARBG.com.txt                 rm $torrentpath/$torrentname/RARBG.com.txt
         fi         fi
         if [ -f "$torrentpath/$torrentname/RARBG.com.mp4" ]         if [ -f "$torrentpath/$torrentname/RARBG.com.mp4" ]
         then         then
-                echo "deleting RARBG video file" >> /home/wuff/.deluge/execute_script.log+                echo "deleting RARBG video file" >> $logfile
                 rm $torrentpath/$torrentname/RARBG.com.mp4                 rm $torrentpath/$torrentname/RARBG.com.mp4
         fi         fi
         if [ -d "$torrentpath/$torrentname/Sample" ]         if [ -d "$torrentpath/$torrentname/Sample" ]
         then         then
-                echo "deleting Sample directory" >> /home/wuff/.deluge/execute_script.log+                echo "deleting Sample directory" >> $logfile
                 rm -rf $torrentpath/$torrentname/Sample                 rm -rf $torrentpath/$torrentname/Sample
         fi         fi
         if [ -d "$torrentpath/$torrentname/sample" ]         if [ -d "$torrentpath/$torrentname/sample" ]
         then         then
-                echo "deleting sample directory" >> /home/wuff/.deluge/execute_script.log+                echo "deleting sample directory" >> $logfile
                 rm -rf $torrentpath/$torrentname/sample                 rm -rf $torrentpath/$torrentname/sample
         fi         fi
  
 fi fi
-echo "Torrent Details: Name: $torrentname Path: $torrentpath ID: $torrentid" >> /home/wuff/.deluge/execute_script.log+echo "Torrent Details: Name: $torrentname Path: $torrentpath ID: $torrentid" >> $logfile
 #zenity on debian hangs, thus using this workaround to send the process into the background and kill it #zenity on debian hangs, thus using this workaround to send the process into the background and kill it
 zenity --notification --text "Torrent download complete: $torrentname" & kill $! zenity --notification --text "Torrent download complete: $torrentname" & kill $!
 </code> </code>
config/deluge.1493321469.txt.gz · Last modified: 2023/05/29 11:53 (external edit)