How to install aMule

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
KamikazeePL
Posts: 16
Joined: Sat Nov 21, 2020 5:57 pm

How to install aMule

Post by KamikazeePL »

How to install aMule with WebServer.

Anyone have installed sucessfully installed aMule?
User avatar
Joulinar
Posts: 5134
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install aMule

Post by Joulinar »

I did a google search and found following

https://linuxconfig.org/how-to-setup-am ... spberry-pi
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
KamikazeePL
Posts: 16
Joined: Sat Nov 21, 2020 5:57 pm

Re: How to install aMule

Post by KamikazeePL »

I try to automaticly restart amule when it crashes

Code: Select all

# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/amule-daemon
Description=LSB: Daemonized version of aMule.
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=remote-fs.target
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
Restart=yes
TimeoutSec=30s
Restart=on-failure
RestartSec=5s
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/amule-daemon start
ExecStop=/etc/init.d/amule-daemon stop
I added this lines to systemd file

Code: Select all

Restart=yes
TimeoutSec=30s
Restart=on-failure
RestartSec=5s
after killall amuled amule doesn't start

Code: Select all

systemctl status amule-daemon
● amule-daemon.service - LSB: Daemonized version of aMule.
Loaded: loaded (/etc/init.d/amule-daemon; generated)
Drop-In: /etc/systemd/system/amule-daemon.service.d
└─dietpi-services_edit.conf
Active: active (exited) since Sun 2021-06-27 15:32:08 CEST; 6h ago
Docs: man:systemd-sysv-generator(8)

Jun 27 15:32:07 DietPi systemd[1]: Starting LSB: Daemonized version of aMule....
Jun 27 15:32:08 DietPi systemd[1]: Started LSB: Daemonized version of aMule..
Jun 27 20:59:16 DietPi systemd[1]: /etc/systemd/system/amule-daemon.service.d/dietpi-services_edit.conf:3: Failed to parse service restart specifier, ignoring: yes

Jun 27 21:22:45 DietPi systemd[1]: /etc/systemd/system/amule-daemon.service.d/dietpi-services_edit.conf:3: Failed to parse service restart specifier, ignoring: yes

Jun 27 21:23:00 DietPi systemd[1]: /etc/systemd/system/amule-daemon.service.d/dietpi-services_edit.conf:3: Failed to parse service restart specifier, ignoring: yes

What is wrong with my config?
User avatar
Joulinar
Posts: 5134
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install aMule

Post by Joulinar »

pls remove following

Code: Select all

Restart=yes
TimeoutSec=30s
and add following to [Unit] section

Code: Select all

# Restart attempt only 5 times in 1 minute
StartLimitIntervalSec=60
StartLimitBurst=5
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3105
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to install aMule

Post by MichaIng »

Restart=yes is invalid and not required as Restart=on-failure is already there and makes what you want I guess: That the service restarts when it crashes.

What Joulinar suggested will additionally limit retries when it fails directly at start.

I btw do not recommend any of those two, especially for such usually not critical services like downloaders. When such a service fails, on start or during operation, there is usually a reason that should be fixed before trying to star it again, like full disk, full memory, invalid config file (e.g. after package upgrade), voltage problems, filesystem corruption or so. In many of those cases, restarting the service over and over is doomed to fail and will make things worse in case ;).
Post Reply