SOLVED Transmission Jail Cron Job Not Running

Status
Not open for further replies.

g00mbs

Dabbler
Joined
Sep 13, 2015
Messages
31
I used the following guide to setup PIA OpenVPN in my Transmission Jail.

I use a script found on p.2 post #24 to port forward the VPN to allow transmission to work better. I have found that the port gets closed after roughly 1 day of use. That brings me to the cron job. I have set up the following commands as cron jobs:

Code:
#run the port forwarding script on p.2 of the other thread
echo MyPassword | sudo -S jexec transmission_1 /usr/local/etc/pia_change_port_forward.sh

#reannounce all torrents
echo MyPassword | sudo -S jexec transmission_1 transmission-remote -t all --reannounce

# resume all torrents
echo MyPassword | sudo -S jexec transmission_1 transmission-remote -t all --start


All of the above jobs are setup to a user other than root on the freenas. When I issue the commands from command line the work fine. Also, when I click "run now", all the jobs work.

Can you help me find what I'm doing incorrectly?r
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You could just setup the cronjob in the jail. This is probably what I would do. Pipeing your password into sudo probably isn't the way to do this.
 

g00mbs

Dabbler
Joined
Sep 13, 2015
Messages
31
It would be nice to be able to use the GUI. I can try to set it up in the jail as well. I'll wait another day or two to see if there are any more responses.

I know piping the password isn't idle, but that was the only way I could figure out making it work.

Here is how the cron jobs are setup.

2015-11-18_08-20-06.png
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
If you can't put the task inside the jail crontab, you can at least have it run as the root user rather than as your own user and immediately using sudo.
 

g00mbs

Dabbler
Joined
Sep 13, 2015
Messages
31
If you can't put the task inside the jail crontab, you can at least have it run as the root user rather than as your own user and immediately using sudo.

This worked. I thought I tried running as root previously, but it didn't work. Now it is. Thanks!
 
Status
Not open for further replies.
Top