Set power_options to "false" i.e. *disable* shutdown/suspend on queue finish

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
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.
Post Reply
Dr_Spaceman
Newbie
Newbie
Posts: 5
Joined: October 6th, 2020, 7:22 am

Set power_options to "false" i.e. *disable* shutdown/suspend on queue finish

Post by Dr_Spaceman »

Is there a way to do this? All my googling leads me to ways to enable this or fix it when it's not working. I want to *prevent* the Sabnzbd user from being able to do this, not even see those options in the dropdown menu.

It seems like the way to do it would be to set would be to set the variable $power_options to "false". The statement "#if $power_options#" shows up in the template files whenever the dropdown menu option is given to shutdown, standby, or hibernate. There is a statement

Code: Select all

header['power_options'] = sabnzbd(dot)WIN32 or sabnzbd(dot)DARWIN or sabnzbd(dot)LINUX_POWER
in the api(dot)py file, but that's the only other reference I could find to "power_options", and it looks like this one just involves the api.

I know next-to-nothing about Python so I can't go any further than that. Any help would be much appreciated.

I am using SABnzbd version: 2.3.2 on Ubuntu 18.04
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Set power_options to "false" i.e. *disable* shutdown/suspend on queue finish

Post by safihre »

The only way to do this is through the code.
In sabnzbd/__init__.py you can replace the line with LINUX_POWER to:

Code: Select all

LINUX_POWER=False
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Dr_Spaceman
Newbie
Newbie
Posts: 5
Joined: October 6th, 2020, 7:22 am

Re: Set power_options to "false" i.e. *disable* shutdown/suspend on queue finish

Post by Dr_Spaceman »

When I set it to "false" I got an error starting the program, but when I set it to "0" that worked exactly as I wanted it to, thank you.
Post Reply