Qnap [ Jackett ] [ 0.20.3546 ] Use just about any tracker with Sonarr or Couchpotato

Thank you!

I noticed that if you run Jackett, then Jackett autoupdate itself, the original pid file was not updated, so now if I try to stop Jackett via console, it won't stop.

I modified the startup script, see if this is good for you, you can always modify it at your choice

Code:
#!/bin/sh
CONF=/etc/config/qpkg.conf
QPKG_NAME="Jackett"
QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}`
export QNAP_QPKG=$QPKG_NAME

export QPKG_ROOT
export QPKG_NAME

export SHELL=/bin/sh
export LC_ALL=en_US.UTF-8
export USER=admin
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export TERM=xterm

export HOME=$QPKG_ROOT
export DIR=$QPKG_ROOT

export DESC=Jackett

export MONO=/opt/Qmono/bin/mono
export PATH=/opt/Qmono/bin:$PATH

export PIDF=/var/run/jackett.pid

pid_check() {
  # Check if process is already running
  if [[ ! -f "$PIDF" ]]; then
    PROCESS_PID=0
  else
    PROCESS_PID=`cat $PIDF`
  fi
  }

second_pid_check() {
  # Check if process is already running
  PROCESS_PID=0
  for pid in $(/bin/pidof mono); do
    # Try to find if the process
    /bin/grep -q "${QPKG_NAME}" /proc/$pid/cmdline
    if [ $? -eq 0 ]; then
      # Process found, save PID and exit loop
      PROCESS_PID=$pid
      break
    fi
  done
  }

ShutdownQPKG() { #kills a proces based on a PID in a given PID file
  pid_check
  if [[ $PROCESS_PID -eq 0 ]]; then
    /bin/echo "${QPKG_NAME} is not running?"
    exit 1
  else
    /bin/echo "Shutting down ${QPKG_NAME}... "
    i=0
    /bin/kill $PROCESS_PID || /bin/rm $PIDF
    /bin/echo -n " Waiting for ${QPKG_NAME} to shut down: "
    while [ -d /proc/$PROCESS_PID ]; do
      /bin/sleep 1
      let i+=1
      /bin/echo -n "$i, "
      if [ $i = 45 ]; then
        /bin/echo " Tired of waiting, killing ${QPKG_NAME} now"
        /bin/kill -9 $PROCESS_PID || /bin/rm $PIDF
        exit 1
      fi
    done
    /bin/echo "Done"
  fi
  }

do_start() {
  pid_check
  if [[ $PROCESS_PID -gt 0 ]]; then
    second_pid_check
    if [[ $PROCESS_PID -gt 0 ]]; then
      /bin/echo "${QPKG_NAME} already running?"
      exit 1
    fi
    /bin/rm $PIDF
  fi
  }

do_stop() {
  ShutdownQPKG
  sleep 2
  if [[ -f "$PIDF" ]]; then
    /bin/rm $PIDF
  fi
  }
  
case "$1" in
  start)
    ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $CONF)
    if [ "$ENABLED" != "TRUE" ]; then
        echo "$QPKG_NAME is disabled."
        exit 1
    fi

	do_start

/bin/ln -sf $QPKG_ROOT /opt/$QPKG_NAME
cd $QPKG_ROOT/Jackett

/opt/Qmono/bin/cert-sync ${QPKG_ROOT}/cacert.pem

sleep 5

/opt/Qmono/bin/mono --debug JackettConsole.exe --IgnoreSslErrors true &
echo $! > $PIDF
sleep 15

    ;;

  stop)

	do_stop

	rm -rf /opt/$QPKG_NAME


    ;;

  restart)
    $0 stop
    $0 start
    ;;

  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit 0

Jo
 
J'ai un nouveau message sur jackett, apparemment il n'y a plus besoin de mono.

"Standalone version of Jackett is now available - Mono not required
To upgrade to the standalone version of Jackett, click here for install instructions. Upgrading is straight forward, simply install the standalone version and your indexers/configuration will carry over. Benefits include: increased performance, improved stability and no dependency on Mono."

https://github.com/Jackett/Jackett#install-on-linux-amdx64
 
je viens de voir le nouveau qpkg pour jackett, il faut faire la mise a jour ? ou tous re-installer ?
 
Donc si j'installe la nouvelle version tous les paramètres vont être repris, inclus l'API et la porte?
 
foXaCe a dit:
Bonjour,

par contre l'auto update ne fonctionne pas chez moi

J’ai eu le problème chez moi.
En fait la taille allouée (64M sur mon TS-253Pro) au dossier /tmp dans lequel est téléchargée puis dézippée la nouvelle version du soft est trop petite.
Il faut augmenter la taille de ce dossier :
mount -o remount,size=256M /tmp

Le problème, c’est qu’à chaque reboot du nas, la taille par défaut sera remise.
Il faut donc exécuter la commande au démarrage :
https://wiki.qnap.com/wiki/Running_Your_Own_Application_at_Startup
 
pas certains que ce soit un bonne idée d'augmenter le /tmp

il faut mieux dédier un repertoire pour cela dans le user space...

je regarde ce que je peux faire
 
Bonjour,

Petite question. Je cherche à stocker la configuration de Jackett dans un répertoire du réseau.
J'ai bien tenté d'utiliser le champ Base Path Override mais j'ai vu que c'était pour le reverse proxy.

J'utilisais avant tout ce petit monde en docker sur une VM dédiée, du coup je voulais garder mes configurations dans le temps (plus pratique pour la sauvegarde etc).
 
bonsoir,
chez moi la version donet refuse de faire les update

Error performing update.

par contre l'ancienne version se mais a jour toute seul sans problème.
une idée d'ou pourrais venir le problème ?