Hello,
I would be glad to find someone who would like to help me making a "shutdown" script work.
Nice to be helped on the forum, but PM is allright too.
Thanks a lot.
SOLVED:Help for writing linux (Antix) shell script to shut down with SABnzbd+
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
SOLVED:Help for writing linux (Antix) shell script to shut down with SABnzbd+
Last edited by znab on March 2nd, 2009, 12:14 pm, edited 1 time in total.
greetz,
znab
SAnzbd+ 0.4.6 on Antix M8.5
znab
SAnzbd+ 0.4.6 on Antix M8.5
Re: Help for writing linux (Antix) shell script to shut down with SABnzbd+
To shutdown sabnzbd you can use something like this:
curl -s http://$SABNZBD_IP:$SABNZBD_PORT/sabnzbd/shutdown &> /dev/null
curl -s http://$SABNZBD_IP:$SABNZBD_PORT/sabnzbd/shutdown &> /dev/null
Arch Linux sabnbzd-svn package: http://aur.archlinux.org/packages.php?ID=21941
Re: Help for writing linux (Antix) shell script to shut down with SABnzbd+
Well, it's my fault I guess. I wanted to shut down my PC after SABnzb+ has finished it's queue.jordz wrote: To shutdown sabnzbd you can use something like this:
curl -s http://$SABNZBD_IP:$SABNZBD_PORT/sabnzbd/shutdown &> /dev/null
In a script, called SABshutdown, I have the following:
#!/bin/bash
#
sudo halt
I can execute this script from 'anywhere' because of a path statement and it will shutdown and power off my PC.
But, nothing seems to happen when I put this script in the "On end of queue" of SABnzbd+.
Mayby this will put you on the right path for more help.
Thanks for your reply!
greetz,
znab
SAnzbd+ 0.4.6 on Antix M8.5
znab
SAnzbd+ 0.4.6 on Antix M8.5
Re: Help for writing linux (Antix) shell script to shut down with SABnzbd+
The "sudo" will fail. It wants a password.
You would need to run SABnzbd as root to enable the "halt" command.
This is the reason we don't support the more advanced end-of-queue actions
for Posix systems.
There's not general way to do it and it usually requires elevated privileges.
You would need to run SABnzbd as root to enable the "halt" command.
This is the reason we don't support the more advanced end-of-queue actions
for Posix systems.
There's not general way to do it and it usually requires elevated privileges.
Re: Help for writing linux (Antix) shell script to shut down with SABnzbd+
I quite understood you're not supporting it. I was just asking someone who would like to guide me to make it work for me the way I want it to work. By the way I think there are general points to think of to make it work on a linux machine and from your answers and skills I think you know them well. I would be glad to know what they are.shypike wrote: The "sudo" will fail. It wants a password.
You would need to run SABnzbd as root to enable the "halt" command.
This is the reason we don't support the more advanced end-of-queue actions
for Posix systems.
There's not general way to do it and it usually requires elevated privileges.
I think there are people out there who made it work and who can and will guide me to make it work for me too. Maybe they will put me on the right track. Thanks to anyone who will.
greetz,
znab
SAnzbd+ 0.4.6 on Antix M8.5
znab
SAnzbd+ 0.4.6 on Antix M8.5
Re: Help for writing linux (Antix) shell script to shut down with SABnzbd+
Got it working now.
Changed the settings of shutdown with chmod u+s /sbin/shutdown
then added a line /sbin/shutdown -h now in the script.
Changed the settings of shutdown with chmod u+s /sbin/shutdown
then added a line /sbin/shutdown -h now in the script.
greetz,
znab
SAnzbd+ 0.4.6 on Antix M8.5
znab
SAnzbd+ 0.4.6 on Antix M8.5