Hello, sorry if I’m being a bit fik here, but I’ve noticed that changing the default hostname form DietPi to something else (hc2b in this case) upsets rtorrent. Here’s a working status output:
root@DietPi:~# systemctl status rtorrent
● rtorrent.service - rTorrent (DietPi)
Loaded: loaded (/etc/systemd/system/rtorrent.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2020-04-17 19:28:47 BST; 15s ago
Process: 818 ExecStart=/usr/bin/screen -fa -dmS rtorrent /usr/bin/rtorrent (code=exited, status=0/SUCCESS)
Main PID: 820 (screen)
CGroup: /system.slice/rtorrent.service
├─820 /usr/bin/SCREEN -fa -dmS rtorrent /usr/bin/rtorrent
└─821 /usr/bin/rtorrent
Apr 17 19:27:29 hc2b systemd[1]: Starting rTorrent (DietPi)…
Apr 17 19:27:29 hc2b systemd[1]: Started rTorrent (DietPi).
Apr 17 19:27:29 hc2b systemd[1]: rtorrent.service: Control process exited, code=exited status=1
Apr 17 19:27:29 hc2b systemd[1]: rtorrent.service: Unit entered failed state.
Apr 17 19:27:29 hc2b systemd[1]: rtorrent.service: Failed with result ‘exit-code’.
I’ve looked around in .rtorrentrc but didn’t see anything that would cause this problem. I’ve rebooted several times, changed it via the dietpi-config screen, editing /etc/hostname and via the hostname command and get the same weirdness. The DietPi version is v6.28.0, and dpkg tells me rtorrent is 0.9.6-2+b1. Is the lock-down addling my brain?
Important note:
rTorrent creates a lock file based on the systems hostname. When the hostname is changed (e.g. via dietpi-config > Security Options), then the old lock file needs to be removed to allow rTorrent creating a new one based on the new hostname:
D’oh! Humble apologies and many thanks! It never occurred to me there would be hostname checks within the application. Yes, that lock file was the issue. I did look at journalctl but didn’t see anything mentioning this. I should have checked the application page anyway, sorry about that.
The link here no longer works, but would this still be the way to do it with newer versions? Without the link due to your quoted parts I think I understand even with my lack of knowledge of Linux that I need to figure out how to stop rtorrent and delete the file if I want to change the host name assuming this has not changed?
I tried to change it based on the commands in this Pihut Guide just editing two files in nano and then when I rebooted with sudo reboot I could not get it to come back online. Now I decided to redo it all and I still would like to change hostname, but I am afraid of breaking it again.
Oh okay, now I understand. I still can see it, as a moderator. I think this was the old “documentation” and it’s still in the forum as reference, but only visible to mods and admins. It was created before I joined here so I was wondering what you were talking about, but now it makes sense to me.
If you don’t mind an additional question, if I do not plan to use BitTorrent/rTorrent because I am using dietpi for setting up only a pihole can I just remove it altogether to simplify changing the hostname or is it best to leave it in place?
Apologies, I am so bad at this I am the one confusing things.
I only wanted to change the hostname but had an issue where my Pi would not come back after reboot after the change. From my research and finding this older post I thought this was a similar issue, but I was probably just doing something else wrong. The dietpi-config suggestion worked thank you so much and sorry for the trouble on an old post.