Page 1 of 1

Can SABNZB send start and stop messages to services on router?

Posted: December 11th, 2018, 1:29 pm
by bpartin2009
I have an OpenVPN (IPvanish) service on my Linksys WRT1900AC router that is flashed with DD-WRT firmware. Can I have SABNZB send a message to the router to start the OpenVPM service just before downloading and then send a stop service call when it's through downloading?
OpenVPN runs on the router because SABNZB, Sickbeard, and CouchPotatoe work to put content on a RAID1 NAS on the network and if I only run IPvanish on the computer then the computer can't see other devices on the network. Also, OpenVPN/IPvanish disrupts access of some websites on the computer and messes with access to Amazon Prime TV on the FireStick. So I'd rather just have the VPN on when downloading with SABNZB and schedule that to run at night.

Re: Can SABNZB send start and stop messages to services on router?

Posted: December 12th, 2018, 1:55 pm
by sander
bpartin2009 wrote: December 11th, 2018, 1:29 pm So I'd rather just have the VPN on when downloading with SABNZB and schedule that to run at night.
AFAIK SABnzbd can't do that.

So, how about this: start and stop the VPN from crontab, like: 00:00 start VPN, 06:00 stop VPN

Re: Can SABNZB send start and stop messages to services on router?

Posted: December 13th, 2018, 2:19 am
by safihre
You could use pre-queue and post processing scripts though to call the API of the router. It has an API right?
The post processing script should also check the sabnzbd api to see if there's any jobs still left in the queue. To not stop it prematurely.

Re: Can SABNZB send start and stop messages to services on router?

Posted: December 13th, 2018, 2:33 am
by sander
safihre wrote: December 13th, 2018, 2:19 am You could use pre-queue and post processing scripts
I thought the pre-queue script is called at the moment of going into the queue? Documentation "You can choose to let SABnzbd run a script just before an NZB enters the queue. "

If the user puts the NZB into the queue at 15:00, but schedules SAB to download from 00:30 ... I would expect the pre-queue script to start at 15:00 ... ?

Re: Can SABNZB send start and stop messages to services on router?

Posted: December 13th, 2018, 2:34 pm
by safihre
Yes you are right!