[SOLVED]Deluge choose random port when starting
Posted: Fri Jan 11, 2013 12:20 am
Hi there, I as some of you have encountered that when you close deluge and try to reopen it again, you can't access the manual selected port, I think this must be fixed in a future version, but meanwhile I made a bashscript to solve it.
Code: Select all
#!/bin/bash
# Script to reset deluge after crashing
PORT="Insert your port here"
# Test if $PORT is free
while true;do
if [[ -z "$(echo "$(netstat -pa 2> /dev/null | grep $PORT)")" ]];then
break
fi
echo "Yes, I'm still alive... For science, you monster!"
done
# Once it's free launch deluge
deluge &