Code Monkey home page Code Monkey logo

Comments (4)

Rathorian avatar Rathorian commented on August 16, 2024

Bonjour,

J'imagine que c'est du à ma récente modification #68
Je devais faire la modification dans le .rtorrent.rc pour prendre en compte les changements.
Malgré tout, j'ai mis en place une copie de sauvegarde du fichier d'origine dans /config/rtorrent/.rtorrent.rc.old

Aurais-tu une idée pour faire différemment ?

from docker-rutorrent.

Merrick28 avatar Merrick28 commented on August 16, 2024

Pour moi le plus gênant est le répertoire de destination, le reste n'est pas vital. Du coup, le plus simple serait de mettre en place une nouvelle variable au lancement du torrent (DOWNLOAD_DIRECTORY) et de faire un sed comme tu l'as fait dans le commit indiqué au dessus, en gardant la variable /data/downloads par défaut si cette variable n'est pas settée

Autre solution possible pour éviter la multiplication des variables, dans le startup, quand tu testes l'existence du fichier (ligne 89), tu peux aussi faire un grep de <PORT_DHT> dans ce fichier. Si tu le trouves : le fichier est vierge, on peut intervenir, sinon, le fichier a déjà été configuré, et on ne fait rien.

if [ -e /config/rtorrent/.rtorrent.rc ]; then
  if grep -q '<PORT_DHT>' config/rtorrent/.rtorrent.rc; then
    
      mv /config/rtorrent/.rtorrent.rc /config/rtorrent/.rtorrent.rc.old
      mv /home/torrent/.rtorrent.rc /config/rtorrent/.rtorrent.rc
      ln -s /config/rtorrent/.rtorrent.rc /home/torrent/.rtorrent.rc
  else
   # fichier déjà present
   ;
  fi
else
  mv /home/torrent/.rtorrent.rc /config/rtorrent/.rtorrent.rc
  ln -s /config/rtorrent/.rtorrent.rc /home/torrent/.rtorrent.rc
fi


(edit pour typo)

from docker-rutorrent.

Rathorian avatar Rathorian commented on August 16, 2024

On va rester sur ta première solution.
Je ferais la modification un peu plus tard dans la journée

from docker-rutorrent.

Merrick28 avatar Merrick28 commented on August 16, 2024

Testé et validé ! Merci beaucoup :)

from docker-rutorrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.