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

Feel free to talk about anything and everything in this board.
Post Reply
bpartin2009
Newbie
Newbie
Posts: 1
Joined: December 11th, 2018, 1:07 pm

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

Post by bpartin2009 » December 11th, 2018, 1:29 pm

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.

User avatar
sander
Release Testers
Release Testers
Posts: 6627
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander » December 12th, 2018, 1:55 pm

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

User avatar
safihre
Administrator
Administrator
Posts: 3206
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

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

Post by safihre » December 13th, 2018, 2:19 am

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.

User avatar
sander
Release Testers
Release Testers
Posts: 6627
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander » December 13th, 2018, 2:33 am

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 ... ?

User avatar
safihre
Administrator
Administrator
Posts: 3206
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

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

Post by safihre » December 13th, 2018, 2:34 pm

Yes you are right!

Post Reply