This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

French community

Moderators: velivole18, ernie, mtiburs

Forum rules
Set-Up GuideFAQsForum Rules
User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1458
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by ernie »

Hello

Et voilà le message

Code: Select all

root@wheezy:~# /etc/init.d/openvpn restart
[....] Stopping virtual private network daemon:/etc/init.d/openvpn: 98: kill: No such process

[ ok nt.
[ ok ] Starting virtual private network daemon: client.
root@wheezy:~# 
Quand openvpn est arrêté (sans savoir pourquoi) et que je fais service openvpn restart, j ai un message similaire où il dit no such process (je ne sais plus le pid).
A+
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)

laster13
PowerUser
PowerUser
Posts: 995
Joined: 01 Jun 2013 19:15
Location: France-Marseille
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by laster13 »

On a pas les mêmes dysfonctionnements. En ce qui me concerne openvpn ne se stoppe pour ainsi dire jamais. Quand tu as un moment poste les fichiers up.sh, down.sh et openvpn.conf pour que je compare avec les miens ;)

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1458
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by ernie »

et voila:

down.sh

Code: Select all

#! /bin/sh
# This script disables policy routing before the tunnel interface is brought down

killall checkVPN

/etc/init.d/transmission-daemon stop

#On efface les règles iptables ajoutées

iptables -D FORWARD -s 192.168.180.1/32 -o eth0 -j DROP
#iptables -D SERVICES -p udp --dport 45000:65000 -j ACCEPT # DHT
iptables -D SERVICES -p tcp --dport 45000:65000 -j ACCEPT # rTorrent random range
iptables -D INPUT -i $1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -D POSTROUTING -t nat -o $1 -j MASQUERADE
iptables -D PREROUTING -t nat -i $1 -p udp --dport 443 -j DNAT --to 192.168.180.1
iptables -D PREROUTING -t nat -i $1 -p tcp --dport 443 -j DNAT --to 192.168.180.1

# Remove rule for the secondary loopback IP address (192.168.0.1)
ip rule del from 192.168.180.1/32 table VPN

# Remove rule for tun0 IP address
ip rule del from $4/32 table VPN
up.sh

Code: Select all

#! /bin/bash
# This script enables policy routing after the tunnel interface is brought up
# Policy routing is used to make sure response packets go through the tunnel interface
# This is mandatory when your ISP has setup anti-spoofing filters

# Add a default route via tun0 into the VPN routing table
ip route add default dev $1 table VPN

# Pass traffic from lo:1 (192.168.0.1) to the VPN routing table, using policy routing ("ip rule" commands)
ip rule add from 192.168.180.1/32 table VPN

# Pass traffic from tur0 IP address to the VPN routing table
ip rule add from $4/32 table VPN

#sed -i 's/\(\"bind-address-ipv4\":\).*/\1\ \"'"$4"'\",/' /etc/transmission-daemon/settings.json

#On ajoute les règles iptables pour faire le NAT

 # Source NAT and destination NAT rules to make sure the incoming and ougoing packets on 192.168.0.1 are $
 iptables -A PREROUTING -t nat -i $1 -p tcp --dport 443 -j DNAT --to 192.168.180.1
 iptables -A PREROUTING -t nat -i $1 -p udp --dport 443 -j DNAT --to 192.168.180.1
 iptables -A POSTROUTING -t nat -o $1 -j MASQUERADE
 # Allow session continuation traffic
 iptables -A INPUT -i $1 -m state --state RELATED,ESTABLISHED -j ACCEPT
 # Allow Bittorrent traffic via tun0
 iptables -A SERVICES -p tcp --dport 45000:65000 -j ACCEPT # rTorrent random range
# iptables -A SERVICES -p udp --dport 45000:65000 -j ACCEPT # DHT

 # Disallow BitTorrent traffic via eth0 - Just to be extra safe ;)
 iptables -A FORWARD -s 192.168.180.1/32 -o eth0 -j DROP

#Démarrage de transmission
/etc/init.d/transmission-daemon restart
#Démarrage du script vérifiant que le VPN est toujours actif
killall checkVPN
/usr/bin/checkVPN &
openvpn.conf

Code: Select all

client
dev tun 
proto udp 

;Pas de modification depuis le serveur de la table de routage 
route-nopull

;Scripts locaux gérant les routes et le client torrent
script-security 2
up /etc/openvpn/client/vpntunnel/scripts/up.sh
down /etc/openvpn/client/vpntunnel/scripts/down.sh

; Cert
ca /etc/openvpn/client/vpntunnel/auth/ca.crt
ns-cert-type server
cipher BF-CBC

;Host
remote se-vpn.vpntunnel.com 443
resolv-retry infinite

;auth
auth-user-pass /etc/openvpn/client/vpntunnel/auth/pass
sndbuf 0
rcvbuf 0

persist-key
persist-tun
nobind
comp-lzo
verb 2

;Maintien de la connexion: ping envoyé toutes les 10s, restart si pas de réponses pendant 60s
keepalive 10 60
ensuite c'est la clé
Attention, mon fichier conf est ici:
/etc/openvpn/client/vpntunnel/config/

et s'appelle stockholm.conf

j'ai suivi le tuto de tech.kanka.ch

A+
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)

laster13
PowerUser
PowerUser
Posts: 995
Joined: 01 Jun 2013 19:15
Location: France-Marseille
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by laster13 »

Ok par contre ds les fichiers up.sh et down.sh tu n'as pas modifié la ligne "/etc/init.d/transmission-daemon stop" ainsi que ds up.sh "/etc/init.d/transmission-daemon restart" .... à moins que tu n'aies laissé tomber rtorrent au profit de transmission ?

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1458
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by ernie »

Non j utilise rtorrent.
Par quoi dois je remplacer ?
Service user-rtorrent start ?
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)

laster13
PowerUser
PowerUser
Posts: 995
Joined: 01 Jun 2013 19:15
Location: France-Marseille
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by laster13 »

Oui du coup rtorrent devait se mettre en route avant ou après openvpn alors que normalement c est le script up.sh qui controle rtorrent

User avatar
lulu80
PowerUser
PowerUser
Posts: 763
Joined: 15 Jun 2014 12:15
Location: France-(Picardie 80)
Contact:
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by lulu80 »

bonjour,
je réinstalle couchpotato l'install c'est bien passé , mais impossible de le faire démarrer :?
je suis sur la version 10.2.0.2.2433 ....une idée ?
root@couchpotato:/ # /etc/rc.d/couchpotato start
/etc/rc.d/couchpotato: WARNING: $command_interpreter /usr/local/bin/python2.7 != /usr/bin/local/python2.7
Starting couchpotato.
eval: /usr/local/couchpotato/CouchPotato.py: not found
/etc/rc.d/couchpotato: WARNING: failed to start couchpotato
root@couchpotato:/ #
edit :j'ai modifier mon post ... headphones & sickrage fonctionne seul couchpotato ne fonctionne pas
Version 11.2.0.4 - Omnius (revision 6400)
https://lucinfordi.fr

laster13
PowerUser
PowerUser
Posts: 995
Joined: 01 Jun 2013 19:15
Location: France-Marseille
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by laster13 »

Bonjour,

Peux tu poster les fichiers
/usr/local/couchpotato/CouchPotato.py
et
/etc/rc.d/couchpotato

User avatar
lulu80
PowerUser
PowerUser
Posts: 763
Joined: 15 Jun 2014 12:15
Location: France-(Picardie 80)
Contact:
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by lulu80 »

bonjour laster , j'ai essayer d'inversé les usr/bin/local/ mais niet :?
j'ai même essayer de l'installer sur une vm débian et la c'est la cata :)

Code: Select all

#!/usr/bin/local/python2.7
from __future__ import print_function
from logging import handlers
from os.path import dirname
import logging
import os
import select
import signal
import socket
import subprocess
import sys
import traceback

# Root path
base_path = dirname(os.path.abspath(__file__))

# Insert local directories into path
sys.path.insert(0, os.path.join(base_path, 'libs'))

from couchpotato.environment import Env
from couchpotato.core.helpers.variable import getDataDir, removePyc


# Remove pyc files before dynamic load (sees .pyc files regular .py modules)
removePyc(base_path)


class Loader(object):

    do_restart = False

    def __init__(self):

        # Get options via arg
        from couchpotato.runner import getOptions
        self.options = getOptions(sys.argv[1:])

        # Load settings
        settings = Env.get('settings')
        settings.setFile(self.options.config_file)

        # Create data dir if needed
        if self.options.data_dir:
            self.data_dir = self.options.data_dir
        else:
            self.data_dir = os.path.expanduser(Env.setting('data_dir'))

        if self.data_dir == '':
            self.data_dir = getDataDir()

        if not os.path.isdir(self.data_dir):
            os.makedirs(self.data_dir)

        # Create logging dir
        self.log_dir = os.path.join(self.data_dir, 'logs');
        if not os.path.isdir(self.log_dir):
            os.makedirs(self.log_dir)

        # Logging
        from couchpotato.core.logger import CPLog
        self.log = CPLog(__name__)

        formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s', '%H:%M:%S')
        hdlr = handlers.RotatingFileHandler(os.path.join(self.log_dir, 'error.log'), 'a', 500000, 10)
        hdlr.setLevel(logging.CRITICAL)
        hdlr.setFormatter(formatter)
        self.log.logger.addHandler(hdlr)

    def addSignals(self):
        signal.signal(signal.SIGINT, self.onExit)
        signal.signal(signal.SIGTERM, lambda signum, stack_frame: sys.exit(1))

        from couchpotato.core.event import addEvent
        addEvent('app.do_shutdown', self.setRestart)

    def setRestart(self, restart):
        self.do_restart = restart
        return True

    def onExit(self, signal, frame):
        from couchpotato.core.event import fireEvent
        fireEvent('app.shutdown', single = True)

    def run(self):

        self.addSignals()

        from couchpotato.runner import runCouchPotato
        runCouchPotato(self.options, base_path, sys.argv[1:], data_dir = self.data_dir, log_dir = self.log_dir, Env = Env)

        if self.do_restart:
            self.restart()

    def restart(self):
        try:
            # remove old pidfile first
            try:
                if self.runAsDaemon():
                    try: self.daemon.stop()
                    except: pass
            except:
                self.log.critical(traceback.format_exc())

            # Release log files and shutdown logger
            logging.shutdown()

            args = [sys.executable] + [os.path.join(base_path, os.path.basename(__file__))] + sys.argv[1:]
            subprocess.Popen(args)
        except:
            self.log.critical(traceback.format_exc())

    def daemonize(self):

        if self.runAsDaemon():
            try:
                from daemon import Daemon
                self.daemon = Daemon(self.options.pid_file)
                self.daemon.daemonize()
            except SystemExit:
                raise
            except:
                self.log.critical(traceback.format_exc())

    def runAsDaemon(self):
        return self.options.daemon and  self.options.pid_file


if __name__ == '__main__':
    l = None
    try:
        l = Loader()
        l.daemonize()
        l.run()
    except KeyboardInterrupt:
        pass
    except select.error:
        pass
    except SystemExit:
        raise
    except socket.error as e:
        # log when socket receives SIGINT, but continue.
        # previous code would have skipped over other types of IO errors too.
        nr, msg = e
        if nr != 4:
            try:
                l.log.critical(traceback.format_exc())
            except:
                print(traceback.format_exc())
            raise
    except:
        try:
            # if this fails we will have two tracebacks
            # one for failing to log, and one for the exception that got us here.
            if l:
                l.log.critical(traceback.format_exc())
            else:
                print(traceback.format_exc())
        except:
            print(traceback.format_exc())
        raise

Code: Select all

#!/bin/sh
#
# PROVIDE: couchpotato
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable couchpotato:
# couchpotato_enable:   Set to NO by default. Set it to YES to enable it.
# couchpotato_user:     The user account CouchPotato daemon runs as what
#                       you want it to be.
# couchpotato_dir:      Directory where CouchPotato lives.
#                           Default: /usr/local/couchpotato
# couchpotato_datadir:  Directory where CouchPotato user data lives.
#                           Default: $couchpotato_dir/data
# couchpotato_conf:     Directory where CouchPotato user data lives.
#                           Default: $couchpotato_datadir/settings.conf
# couchpotato_pid:      Full path to PID file.
#                           Default: $couchpotato_datadir/couchpotato.pid
# couchpotato_flags:    Set additonal flags as needed.

. /etc/rc.subr

name="couchpotato"
rcvar=couchpotato_enable

load_rc_config ${name}

: ${couchpotato_enable:=NO}
: ${couchpotato_user:=} #default is root
: ${couchpotato_dir:=/usr/local/CouchPotato}
: ${couchpotato_datadir:=${couchpotato_dir}/data}
: ${couchpotato_conf:=} #default is datadir/settings.conf
: ${couchpotato_pid:=} #default is datadir/couchpotato.pid
: ${couchpotato_flags:=}

command="${couchpotato_dir}/CouchPotato.py"
command_interpreter="/usr/bin/local/python2.7"
command_args="--daemon --data_dir ${couchptato_datadir}"

# append optional flags
if [ -n "${couchpotato_pid}" ]; then
    pidfile=${couchpotato_pid}
    couchpotato_flags="${couchpotato_flags} --pid_file ${couchpotato_pid}"
fi
if [ -n "${couchpotato_conf}" ]; then
    couchpotato_flags="${couchpotato_flags} --config_file ${couchpotato_conf}"
fi

run_rc_command "$1"
Version 11.2.0.4 - Omnius (revision 6400)
https://lucinfordi.fr

User avatar
lulu80
PowerUser
PowerUser
Posts: 763
Joined: 15 Jun 2014 12:15
Location: France-(Picardie 80)
Contact:
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by lulu80 »

bon ça fonctionne maintenant :roll: et voilà ce que j'ai fait ...
laster tu me dit si quelque chose ne va pas mais pour moi cela fonctionne

install python2.7

Code: Select all

pkg install python27 py27-sqlite3 unzip py27-yenc py27-cheetah py27-openssl py27-feedparser py27-utils unrar par2cmdline
install couchpotato

Code: Select all

pkg install git wget

Code: Select all

git clone git://github.com/sarakha63/persomov.git /usr/local/couchpotato
cp /usr/local/couchpotato/init/freebsd /etc/rc.d/couchpotato
chmod +x /etc/rc.d/couchpotato
echo 'couchpotato_enable="YES"' >> /etc/rc.conf

Code: Select all

pkg install nano 

nano /etc/rc.d/couchpotato
Repérer et modifier la ligne suivante :
: ${couchpotato_dir:=/usr/local/CouchPotatoServer}

Par
: ${couchpotato_dir:=/usr/local/couchpotato} <<----- là OK

Repérez la ligne suivante :
command_interpreter="/usr/local/bin/python"

Remplacer par :
command_interpreter="/usr/local/bin/python2.7" <<---- la j'ai retirer les ("")

Code: Select all

nano /usr/local/couchpotato/CouchPotato.py
Repérez la ligne suivante :
#!/usr/bin/env python

Modifier la
#!/usr/bin/local/python2.7 <<--- la j'ai mis ---->> #!/usr/local/bin/python2.7
On lance couchpotato

Code: Select all

/etc/rc.d/couchpotato start
Last edited by lulu80 on 31 Mar 2016 20:46, edited 1 time in total.
Version 11.2.0.4 - Omnius (revision 6400)
https://lucinfordi.fr

laster13
PowerUser
PowerUser
Posts: 995
Joined: 01 Jun 2013 19:15
Location: France-Marseille
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by laster13 »

Bien vu lulu ;)

User avatar
lulu80
PowerUser
PowerUser
Posts: 763
Joined: 15 Jun 2014 12:15
Location: France-(Picardie 80)
Contact:
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by lulu80 »

Alors c'est bon ce que j'ai fait ?
Version 11.2.0.4 - Omnius (revision 6400)
https://lucinfordi.fr

User avatar
rpj
Starter
Starter
Posts: 20
Joined: 26 Jun 2012 16:36
Location: Ile de France, France
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by rpj »

Lors de install sabnzbd, en faisant Fetch des python pakages voici le message:
pkg install pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:11:amd64 ... st/pkg.txz: Operation timed out
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
je vous informe que j'ai fait un installe fraîche de thebrig par OBI. Et je suis en dernier version 11.1.

Merci d'avance.
11.1.0.2 - Atomics x64-embedded sur AMD Athlon(tm) 64 Processor 3200+ :D

User avatar
rpj
Starter
Starter
Posts: 20
Joined: 26 Jun 2012 16:36
Location: Ile de France, France
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by rpj »

rpj wrote:
04 Oct 2017 14:30
Lors de install sabnzbd, en faisant Fetch des python pakages voici le message:
pkg install pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:11:amd64 ... st/pkg.txz: Operation timed out
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
je vous informe que j'ai fait un installe fraîche de thebrig par OBI. Et je suis en dernier version 11.1.

Merci d'avance.
J'arrive à résoudre en supprimant et réinstallant Sbanzbd+! Sabnzbd fonctionne, mais il y a des avertissements concernant "SAByenc"pkg et les certificats de sécurité a cause de dernier version SABnzbd+2.1.0.J'arrive à installer les pkg sabyenc mais il y a des conflits de versions.
11.1.0.2 - Atomics x64-embedded sur AMD Athlon(tm) 64 Processor 3200+ :D

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1458
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: [Topic unique] SABnzbd, Sickbeard, Couchpotato, Headphones

Post by ernie »

Merci Rpj

Ce sujet était maitrisé et fait par Laster13, qui est moins présent sur le forum. Donc toutes tes trouvailles sont les bienvenues. Et si tu es motivés pour mettre à jour le tuto, c'est bienvenu.
A bientôt
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)

Post Reply

Return to “Français”