Created attachment 225906 [details] patch Add add rc.d script. Install /doc/rtorrent.rc into ${ETCDIR}/rtorrent.config.sample.
Thanks for your work. I don't know, this needs to be executed in daemon mode, and usually, users want to hold everything in a homedir. What about installing this rc.script as an example and add a message to the pkg-message about it?
I use it as daemon only with WebUI rutorrent: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239921 It runs as www, www have no home dir on my home server. If some one do not want run rtorrent as daemon - then do not add rtorrent_enable="YES" in /etc/rc.conf, no need to move rc.d script to examples to prevent daemon start.
(In reply to rozhuk.im from comment #2) I know, it was not what I meant. So, there are other port involved, you can't use the rcscript without that. Well, at least inform users about that. I don't have time to dig into this, so I dropped maintainership from rtorrent/libtorrent, don't want to hold your work.
Open to take.
Assign to maintainer.
> Add add rc.d script. I don't see why we should include a rc in this port. My opinion is to continue to have it simpler. > Install /doc/rtorrent.rc into ${ETCDIR}/rtorrent.config.sample. Port is using the upstream file name: https://github.com/rakshasa/rtorrent/wiki/CONFIG-Template#using-the-template I will not change that. Thanks
I use it as daemon and never even see it TUI. Only web gui in my installation: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239921
(In reply to Ivan Rozhuk from comment #7) It seams that Arch have an rtorrent-headless flavor but I don't see a dependency on rutorrent pkg. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=rtorrent-headless https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=rutorrent Ok, I started to understand better the need for rc script. Let's do the following, put this PR as a dependency of 239921 (rutorrent new port).
(In reply to Nuno Teixeira from comment #8) rtorrent have "RPC" interface that can be used by rutorrent or probably some other tools/xxxUI. rutorrent may be installed on other host than rtorrent. I many years (since 2009-2010) run rtorrent as daemon using my patch to remove TUI and rc.d script to run as daemon. It was planned as centralized replacement to uTorrent: I do not want to have multiple torrent clients at home (me, wife, children's...), one client - is simple to manage network channel load. Only in past few years rtorrents author add option to build it without TUI and run as daemon. Probably after that this PR was opened.
Whats your opinion of creating a "rtorrent-headless" port like Arch do just for adding required rc scripts and stuff? This way rtorrent port isn't touched/changed. rtorrent-headless port will run depend on rtorrent. ( https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=rtorrent-headless )
(In reply to Nuno Teixeira from comment #10) IMHO it is overengineering just for one rc.d script ) rc.d script related to XMLRPC option. And if there exist option to disable TUI - nice to have it.
(In reply to Ivan Rozhuk from comment #11) Ok, understood. Related to: ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ ${STAGEDIR}${ETCDIR}/rtorrent.config.sample rtorrent by defaults reads ~/.rtorrent.rc config. I can't find out if it can read a global config from $PREFIX${ETCDIR}. Supose that it reads global {STAGEDIR}${ETCDIR}/rtorrent.rc, than this should be corrected to: ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ ${STAGEDIR}${ETCDIR}/rtorrent.rc.sample and thus, @sample macro do its job as usual?
(In reply to Nuno Teixeira from comment #12) from my rc.d script: ... ${rtorrent_config="%%PREFIX%%/etc/${name}/${name}.conf"} # .rtorrent.rc config file name. ... command_args="${command_args} -o import=${rtorrent_config}" ... to read config from any place. > Supose that it reads global {STAGEDIR}${ETCDIR}/rtorrent.rc, than this should be corrected to rc.d script expect .conf file. Better that config file name be same in rc.d and on disk. Looks like I miss that .conf != .config.
Created attachment 255214 [details] v0: rename .config -> .conf When starting service rtorrent as root (`service rtorrent onestart`) Starting rtorrent. daemon: pidfile ``/var/run/rtorrent.pid'': Permission denied /usr/local/etc/rc.d/rtorrent: WARNING: failed to start rtorrent Any clues?
Created attachment 255336 [details] patch
(In reply to Nuno Teixeira from comment #14) This patch should fix it. On my systems /var/run have 1777 perms and I always miss that.
I will test it this weekend. Could you provide a short description about this rc script and for what is usefull? My opinion is to create a pkg-message that instruct users to use it only under certain circunstances. Thoughts?