[FreeNAS 9 Plugins] - SAB / SB / CP / HP / Maraschino / HTPC / Mylar / LL / Gamez

Status
Not open for further replies.

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I've given up on trying to fix why the script won't run. I did run the python install and it looks like it was pretty out of date. Maybe that caused the issue. It's getting pretty old haivng to manually modify new files when the download. I'd like to just go through your guide again on setting up the plugins. Can you recommend a process to completely install the plugins from scratch. Would I need to delete my jail? Any risks you can see with this?
if you want to go through my blog from scratch this is what I'd recommend you do.
* delete any plugins installed to your jail doing the downloading
- once they are all deleted the jail should be deleted as well
* when going through the blog post, after you install sabnzbd, make sure the sabnzbd_1 jail has its media dataset mounted
 

carleycr

Patron
Joined
May 2, 2014
Messages
233
if you want to go through my blog from scratch this is what I'd recommend you do.
* delete any plugins installed to your jail doing the downloading
- once they are all deleted the jail should be deleted as well
* when going through the blog post, after you install sabnzbd, make sure the sabnzbd_1 jail has its media dataset mounted
Thanks for the advice. Does it matter that i have all my plugins in the same jail? Couchpotato, sabnzbd, transmission, plex and sickrage? So if I delete Sab, Transmission I'll still have the jail. Any advice there?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks for the advice. Does it matter that i have all my plugins in the same jail? Couchpotato, sabnzbd, transmission, plex and sickrage? So if I delete Sab, Transmission I'll still have the jail. Any advice there?
since youll probably want to keep their jails you can just delete those plugins metadata which would be the same as reinstalling them.
rm -r /var/db/sabnzbd
 

carleycr

Patron
Joined
May 2, 2014
Messages
233
since youll probably want to keep their jails you can just delete those plugins metadata which would be the same as reinstalling them.
rm -r /var/db/sabnzbd
So just to be clear, run that command in the jail and that will remove Sabnzbd? What about Transmission?
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
Hi everyone

How can I update couchpotato with git pull as the latest plugin is behind it does not have the cookies entry for iptorrents and torrent day. Also does not work with sabnzbd 1.1.1 using the API key ver 1.1.0 worked. it says connection fail and won't send nzbs. When I click update in couch it say no update found. Also in you guide under sick rage settings for failed downloads has moved from post process to episode search settings. Only noticed it since I redid my whole feenas and plugin reinstall.

Thanx


Sent from my iPhone using Tapatalk
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So just to be clear, run that command in the jail and that will remove Sabnzbd? What about Transmission?
That wouldn't remove sabnzbd itself, that command would remove the data-directory (config / database) that sabnzbd leaves behind. You would want to stop and remove the sabnzbd plugin first.

transmission is the same case, except its folder is /var/db/transmission
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi everyone

How can I update couchpotato with git pull as the latest plugin is behind it does not have the cookies entry for iptorrents and torrent day. Also does not work with sabnzbd 1.1.1 using the API key ver 1.1.0 worked. it says connection fail and won't send nzbs. When I click update in couch it say no update found. Also in you guide under sick rage settings for failed downloads has moved from post process to episode search settings. Only noticed it since I redid my whole feenas and plugin reinstall.

Thanx


Sent from my iPhone using Tapatalk
The plugin does not use git to update. It uses a what is sometimes referred to as 'source' method. There should be no need for me to update the plugin as long as the source method continues to work.
For example, my personal system is using the latest plugin version "autoupdate.9_5" and couchpotato updates itself to its latest code (see attached).

As for connecting to sabnzbd v1.1.1, my couchpotato can do this as well. Maybe you should check to make sure your couchpotato is on the latest version from 11/15/2016, then test Downloaders > Sabnzbd > Test Sabnzbd

Thanks for informing of the changes to sickrage, I updated my blog post.
 

Attachments

  • Screenshot from 2016-12-18 22-42-09.png
    Screenshot from 2016-12-18 22-42-09.png
    8.4 KB · Views: 242

denist

Contributor
Joined
Jan 28, 2013
Messages
188
Hi Joshua,

The app version on mine is older and I am also using the autoupdate9_5. When I try to use the update function in CP it says no new updates, but I know there is as I am missing the cookies entry for TorrentDay and Iptorrents, and also the sabnzbd will work then. I thought there might be a way to pull the request with git pull or some sort to force CP to update.


Sent from my iPhone using Tapatalk
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua,

The app version on mine is older and I am also using the autoupdate9_5. When I try to use the update function in CP it says no new updates, but I know there is as I am missing the cookies entry for TorrentDay and Iptorrents, and also the sabnzbd will work then. I thought there might be a way to pull the request with git pull or some sort to force CP to update.


Sent from my iPhone using Tapatalk
Here's some solutions you can try...
* post your log on the couchpotato github/forum to see why updating isn't working
* manually replace the source at /usr/pbi/couchpotato-amd64/share/couchpotato
* backup /var/db/couchpotato, delete and reinstall the couchpotato plugin, set it up (which should pull in the latest version), then restore that directory
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
Thanks Joshua,

I'll try the manually replace source when I get home.


Sent from my iPhone using Tapatalk
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
I have noticed now that transmission backup files are now in the same place as the rest.


Sent from my iPhone using Tapatalk
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
Hey Joshua,

You seem to know a lot about freenas and plugins, I have a script file that I run for opening transmission port as I am using pia vpn. This was working fine all night then all of a sudden say cannot find command. The script uses bash and it is located in /usr/local/bin. When I do a where bash does work. It it did. Would you know a fix for this as I am using freenas 9.10. I noticed yesterday it was not working all day then when I was deleting scripts and reinstalling bash and othe pkgs and then doing some test it started finishing the commands again but that last 30min then stopped. Thanks.


Sent from my iPhone using Tapatalk
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
Where bash does not work. When the script errors and says cannot find command.


Sent from my iPhone using Tapatalk
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@denist
why do you need to use bash? I personally avoid in and make my scripts portable for Unix OSs.
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
I use this script which use vash to get openvpn and pia to port forward the port for transmission.

Code:
#! /usr/local/bin/bash
# Cronable port forwarding script for PIA/transmission running on
# FreeNAS
#
# Requires bash, jq (JSON parser) and curl
# pkg install -y jq bash curl
# Assumes tunnel is tun0 if different change below
#

# Your PrivateInternetAccess credentials
PIA_USER=username
PIA_PASS=password

# Export path for when you use this in cron
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin"

# echo date/time for logging
echo "Transmission Port Forward $(date +%Y-%m-%d-%H:%M:%S)"

get_new_port( ) {
  if ! [ -x $(curl)  ]; then
  echo "Curl not installed/not executable"
  exit 0
  fi
   
  # get the local tunnel ip
  local_ip=$(ifconfig tun0 | grep "inet " | cut -d\  -f2)
   
  #client_id seems to want random data
  client_id=$(head -n 100 /dev/urandom | md5 -r | tr -d " -")
   
  port=$(curl --silent --data "user=$PIA_USER&pass=$PIA_PASS&client_id=$client_id&local_ip=$local_ip" https://www.privateinternetaccess.com/vpninfo/port_forward_assignment | jq .port)
   
  if ! [[ $port =~ ^[0-9]+$ ]]; then
  echo "Garbled data: $port"
  exit 0
  fi
   
  transmission-remote -p $port
}

is_port_forwarded( ) {
  # -pt tests for open port.
  json=$(transmission-remote -pt)
   
  if [[ $json == "Port is open: No" ]]; then
  echo "Closed port detected"
  get_new_port
  elif [[ $json == "Port is open: Yes" ]]; then
  echo "Open port detected"
  exit 1

  fi
}

check_for_connectivity( ) {
  if nc -zw 1 google.com 80; then
  echo "VPN connection up."
  else
  echo "VPN connection down. Exiting."
	 exit 0

  fi
}

check_for_connectivity
is_port_forwarded

exit 1
 

denist

Contributor
Joined
Jan 28, 2013
Messages
188
And this is the error i am receving now

Code:

/sabnzbd/scripts/port_forward.sh: line 9: $'\r': command not found /sabnzbd/scripts/port_forward.sh: line 13: $'\r': command not found /sabnzbd/scripts/port_forward.sh: line 16: $'\r': command not found Transmission Port Forward 2016-12-20-21:20:00 /sabnzbd/scripts/port_forward.sh: line 19: $'\r': command not found /sabnzbd/scripts/port_forward.sh: line 20: syntax error near unexpected token `$'{\r'' /sabnzbd/scripts/port_forward.sh: line 20: `get_new_port( ) {
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'll take a look tonight, I bet you could get everything working without bash and curl.

your first line shouldn't have a space between #! and the path to the parser.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
are you using the transmission plugin?
 
Status
Not open for further replies.
Top