How to install aMule

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
KamikazeePL
Posts: 34
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: 6506
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: 34
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: 6506
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: 3531
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 ;).
KamikazeePL
Posts: 34
Joined: Sat Nov 21, 2020 5:57 pm

Re: How to install aMule

Post by KamikazeePL »

I moved to docker and it works out of box.
Tarrasque
Posts: 27
Joined: Wed Jun 26, 2019 11:13 am

Re: How to install aMule

Post by Tarrasque »

KamikazeePL wrote: Sat Aug 21, 2021 10:01 pm I moved to docker and it works out of box.
How do you do that? Sorry, never used docker.
User avatar
Joulinar
Posts: 6506
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install aMule

Post by Joulinar »

you could install docker from dietpi-software. I would recommend Portainer as well. Portainer is a simply web based management interface for your containers. https://dietpi.com/docs/software/programming/#portainer

I found following container that should be able to run on ARM based SBC's https://hub.docker.com/r/ngosang/amule
There is a description on how to start/setup the container. You could use the docker-compose part and start the container with the help of Portainer. Portainer is offering an option where you could simply copy past the code block in.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Tarrasque
Posts: 27
Joined: Wed Jun 26, 2019 11:13 am

Re: How to install aMule

Post by Tarrasque »

Thank you. I will try it as soon as I can.

I'll have to make a new image for testing, since I don't want to mess up with my working installation (after so much time I'm not sure I would be able to fix things if I go wrong).

Will the docker installation start up automatically at boot like a regular daemon/service installation?
User avatar
Joulinar
Posts: 6506
Joined: Sat Nov 16, 2019 12:49 am

Re: How to install aMule

Post by Joulinar »

Yes Docker will start up on boot as all other services. For testing you could simple spin up a VM on your normal computer. We offer a couple of different images for various VM application. https://dietpi.com/docs/install/#how-to-install-dietpi
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply