Page 1 of 1

Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 23rd, 2011, 11:51 am
by sander
Feature request: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB-directory, which can be mouse-clicked upon by a user with a non-starting SABnzbd


SABlocalhost.bat would be the same as "SABnzbd.exe -s 127.0.0.1:8080"
SABcleanini.bat would be something like "mv sabnzbd.ini sabnzbd.ini.OLD ; SABnzbd.exe"

These would be the *clickable* executables for SAB-setups not able to start anymore because of IP, port or other setting problems.

Reason:
An enormous amount of questions in the forum is about "SABnzbd won't start / SABnzbd will give an error when trying to start". So it's a FAQ.
The problem is that de Frequently Given Answer is to run SAB with " -s 127.0.0.1:8080" .... which, however, appears to be difficult for SAB users: It often involves trying to explain how to open a CMD box, and/or how to find & move sabnzbd.ini.  :(

So this can be solved by creating the two executables, which then can just be *clicked* by a user. Problem solved.

(I would find it even better if the normal SABnzbd.exe would fall back to SABlocalhost.exe in case of port problems. But that's a bridge too far (is that an English expresson?) for this moment).

It would be probably wise to put a message/confirmation in the SABcleanini executable saying it should only be run in case of serious SAB startup problem and if SABlocalhost does not solve that problem.


I've implemnted this on my Ubuntu machine:

Code: Select all

sander@lifebook:~/SABnzbd-0.6.0Beta2$ ll SAB*sh
-rwxr-xr-x 1 sander sander 80 2011-02-23 17:44 SABcleanini.sh*
-rwxr-xr-x 1 sander sander 43 2011-02-23 17:32 SABlocalhost.sh*
sander@lifebook:~/SABnzbd-0.6.0Beta2$ 

sander@lifebook:~/SABnzbd-0.6.0Beta2$ cat ./SABcleanini.sh 
#!/bin/sh

mv ~/.sabnzbd/sabnzbd.ini ~/.sabnzbd/sabnzbd.ini.OLD.$$

./SABnzbd.py

sander@lifebook:~/SABnzbd-0.6.0Beta2$



sander@lifebook:~/SABnzbd-0.6.0Beta2$ cat SABlocalhost.sh
#!/bin/sh 

./SABnzbd.py -s 127.0.0.1:8080
sander@lifebook:~/SABnzbd-0.6.0Beta2$ 



Re: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 23rd, 2011, 3:40 pm
by shypike
I already planned to add "SABnzbd Safe mode" entry in the Windows Start menu.
Not sure how to do this in a useful way for Linux and OSX.
It's actually something for the Linux package builder.

Re: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 25th, 2011, 2:56 am
by sander
shypike wrote: I already planned to add "SABnzbd Safe mode" entry in the Windows Start menu.
Not sure how to do this in a useful way for Linux and OSX.
It's actually something for the Linux package builder.
Shypike,

I was helping a Windows user with a non-starting SABnbzd (060 version), and I already saw "SABnzbd Safe Mode" in the Start list. Is it already implemented in 060?

Anyway: SABnzbd Safe Mode did not help; SAB did not start. Or: was not reachable. I am not sure. So I hand-created a SAB-localhost8080.bat (which I could *not* put into c:\program files\sabnzbd\ because of missing rights (?)), which started "SABnzbd-console.exe  -s 127.0.0.1:8080 -b 1". And that worked: SAB started and was accessible again.


So: my method seems to work. ;-)


EDIT:

PS the old Windows sabnzbd.ini was using ort 8185 instead of 8080. So my first guess is that the Windows user had clicked / tried to start SABnzbd 21 times? ... which I don't understand as SABnzbd seems to check if it's already running ...  ???

Re: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 25th, 2011, 2:59 am
by sander
shypike wrote:
Not sure how to do this in a useful way for Linux and OSX.
It's actually something for the Linux package builder.
I guess the linux package *src.tar.gz (provided by you, not the linux package builder) can contatin the files I suggested, can't it?

And probably that's possible for the OSX image too?

Re: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 25th, 2011, 3:17 am
by shypike
sander wrote: I was helping a Windows user with a non-starting SABnbzd (060 version), and I already saw "SABnzbd Safe Mode" in the Start list. Is it already implemented in 060?
No, it's called Safe Mode, but it's nothing more than SABnzbd-console.exe.
It's a misnomer.
The "new" safe mode will start like this: --server 127.0.0.1:8080 -b1 -t Plush --no-login
The last parameter is new for Beta3 and will remove the web username/password.

BTW: OSX doesn't really need a SafeMode, it already has the menu bar, so it's always accessible.

For the Linux, the package creator might create  an extra script.
We provide no startup script because it to OS-dependent.

Re: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 25th, 2011, 4:00 am
by sander
shypike wrote:
sander wrote: I was helping a Windows user with a non-starting SABnbzd (060 version), and I already saw "SABnzbd Safe Mode" in the Start list. Is it already implemented in 060?
No, it's called Safe Mode, but it's nothing more than SABnzbd-console.exe.
It's a misnomer.
The "new" safe mode will start like this: --server 127.0.0.1:8080 -b1 -t Plush --no-login
The last parameter is new for Beta3 and will remove the web username/password.
Wow. Cool. That will solve a lot of questions in the forums.
Two more remarks, maby out of scope:
what if port 8080 is already used by some other app?
is SAB able to detect a firewall blocking it from starting app? Maybe something in the port hunting that after 20 ports refused, SAB bails out saying "unable to use a port for the SAB webGUI; firewall possibly blocking"
shypike wrote: BTW: OSX doesn't really need a SafeMode, it already has the menu bar, so it's always accessible.
Another friend, using OSX, wasn't able to enter his WebGUI because he had set a login/password on the GUI. I told him to analyze his sabnzbd.ini. Based on your info, there is an easier method on OSX?

shypike wrote: For the Linux, the package creator might create  an extra script.
We provide no startup script because it to OS-dependent.
OS-dependent or Linux-distro-dependent? If you really mean OS-dependent, I agree; my scripts above won't fit on a Windows environment

Re: Add clickable recover-executables "SABlocalhost" and "SABcleanini" to SAB

Posted: February 25th, 2011, 6:11 am
by shypike
sander wrote: what if port 8080 is already used by some other app?

is SAB able to detect a firewall blocking it from starting app?
Another friend, using OSX, wasn't able to enter his WebGUI because he had set a login/password on the GUI. I told him to analyze his sabnzbd.ini. Based on your info, there is an easier method on OSX?

OS-dependent or Linux-distro-dependent? If you really mean OS-dependent, I agree; my scripts above won't fit on a Windows environment
Other ports are already tried in the current release.

Alas no. A good firewall is transparent.
We could add automatic support for the Windows Firewall, but my view is
that anyone wanting to expose SABnzbd's UI to other systems, should know what he/she is doing.
And in that case, the firewall is just a small issue.

I meant Distro dependent.
And there's more Unixes than Linux.