Вы здесь

rtorrent не запускаеться.

Добрый вечер.
rtorrent не запускается, помогите пожалуйста разобраться.

rtorrent -help
Rakshasa's BitTorrent client version 0.9.7

# uname -rms
Linux 4.9.95-gentoo x86_64

# /etc/init.d/rtorrentd restart
* Stopping rtorrent ...
pgrep: ключ должен использоваться с аргументом — «P»

Usage:
pgrep [options]

Options:
-d, --delimiter specify output delimiter
-l, --list-name list PID and process name
-a, --list-full list PID and full command line
-v, --inverse negates the matching
-w, --lightweight list all TID
-c, --count count of matching processes
-f, --full use full process name to match
-g, --pgroup match listed process group IDs
-G, --group match real group IDs
-i, --ignore-case match case insensitively
-n, --newest select most recently started
-o, --oldest select least recently started
-P, --parent match only child processes of the given parent
-s, --session match session IDs
-t, --terminal match by controlling terminal
-u, --euid match by effective IDs
-U, --uid match by real IDs
-x, --exact match exactly with the command name
-F, --pidfile read PIDs from file
-L, --logpidfile fail if PID file is not locked
--ns match the processes that belong to the same
namespace as
--nslist list which namespaces will be considered for
the --ns option.
Available namespaces: ipc, mnt, net, pid, user, uts

-h, --help display this help and exit
-V, --version output version information and exit

For more details see pgrep(1). [ !! ]
* ERROR: rtorrentd failed to stop

Вот сам файл запуска.

# cat /etc/init.d/rtorrentd
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
use net ypbind nis
after slapd mysqld postgresql
}

start() {
PWHOME="$(getent passwd $USER | awk -F: '{ print $6 }')"

ebegin "Starting rtorrent"
env TERM="xterm" \
start-stop-daemon \
--start \
--make-pidfile \
--pidfile /var/run/rtorrentd.pid \
--background \
--user $USER \
--env HOME="${PWHOME:-/home/$USER}" \
--name rtorrent \
--exec /usr/bin/screen -- -D -m -S rtorrentd /usr/bin/rtorrent
eend $?
}

stop() {
ebegin "Stopping rtorrent"
# Because we've daemonized with screen, we need to replace the PID file with the real PID of rtorrent
pgrep -P $(cat /var/run/rtorrentd.pid) > /var/run/rtorrentd.pid

start-stop-daemon --stop --signal 15 \
--pidfile /var/run/rtorrentd.pid
eend $?
}

Откатился до версии 0.9.6, rtorrent запустился.

Что бы ты не делал , жизнь слишком коротка!
Блог о BSD системах.

Очевидно же: ты используешь рестарт, но процесс не был запущен, т.е. ПИДа нет!
Подправь скрипт на проверку наличия файла.

пид создавался.
Перешал на чуть старее версию, и так пойдет.
Притом в новой версии полностью изменились параметры все, на кой такое делать полностью параметры изменять не понимаю.

Что бы ты не делал , жизнь слишком коротка!
Блог о BSD системах.

Aaa, у них ошибка, надо подправить

        pgrep -P $(cat /var/run/rtorrentd.pid) > /var/run/rtorrentd.pid
start-stop-daemon --stop --signal 15 \
--pidfile /var/run/rtorrentd.pid

заменить на

RT_PID=$(pgrep -P $(cat /var/run/rtorrentd.pid))
if [ -z "$RT_PID" ] ;then
cp /var/run/rtorrentd.pid /var/run/real-rtorrentd.pid
else
echo $RT_PID > /var/run/real-rtorrentd.pid
fi
start-stop-daemon --stop --signal 15 --pidfile /var/run/real-rtorrentd.pid

Спасибо, мне не принципиально на новую версию.
пусть будит пока старая версия.

Что бы ты не делал , жизнь слишком коротка!
Блог о BSD системах.

Не совсем понятно что там такого экзотического, чтобы требовалось переопределение стандартных функций.
Подозреваю, что стартовый скрипт тянет окаменелости с какой-то древней версии openrc.

ЗЫ: Но отрапортоваться на bgo надо!

ЗЗЫ: Если не лениться читать журналы, то найти… основания для замечаний можно далеко не только у rtorrent'а.

:wq
--
Live free or die