Replacing SCREEN with DTACH

Problems with packages? Post here, using [tags] of the package name.

Replacing SCREEN with DTACH

Postby rty » Mon Feb 11, 2013 5:30 am

I followed the steps outlined in https://wiki.archlinux.org/index.php/ to install RTorrent to work with screen. It works fine but when I tried to replace SCREEN with DTACH (which I was told is much better), I couldn't get SYSTEMCTL to start DTACH.

Here is the original daemon script for rtorrent using SCREEN as outlined in Archwiki:

$this->bbcode_second_pass_code('', 'nano /etc/systemd/system/rtorrent@.service ')

$this->bbcode_second_pass_code('', '[Unit]

Description=rTorrent

[Service]
Type=forking
User=%I
ExecStart=/usr/bin/screen -d -m -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 rtorrent

[Install]
WantedBy=multi-user.target')

To enable and to start RTORRENT with SCREEN:
$this->bbcode_second_pass_code('', 'systemctl enable rtorrent@$USER
systemctl start rtorrent@$USER')

Here is what I did to replace SCREEN with DTACH

$this->bbcode_second_pass_code('', 'pacman -Sy dtach')

rtorrent runs just fine in the background with DTACH when I launched it from the command line
$this->bbcode_second_pass_code('', '# dtach -n /tmp/rtorrent.dtach rtorrent')

But when I tried to start it with SYSTEMCTL, the daemon doesn't seem to start:
$this->bbcode_second_pass_code('', 'systemctl start rtorrent@$USER')

All I did was changing ExecStart line in /etc/systemd/system/rtorrent@.service to:
$this->bbcode_second_pass_code('', 'ExecStart=/usr/bin/dtach -n /tmp/rtorrent.dtach /usr/bin/rtorrent')

Can anyone please help? Thanks in advance.
Alarm + Samba + NginX + Php+ MySQL + phpMyAdmin on Raspberry Pi 3, Pogoplug 4, Pogoplug E02, Seagate Goflex Home
rty
 
Posts: 75
Joined: Sun Jun 03, 2012 8:57 am
Location: Singapore

Return to Packages

Who is online

Users browsing this forum: No registered users and 3 guests