0
点赞
收藏
分享

微信扫一扫

To add the `aMuled` service and have it automatically launch after Debian boots,


To add the aMuled service and have it automatically launch after Debian boots, you can create a systemd service unit file. Here’s a step-by-step guide:

  1. Create a new systemd service file:
    Open a terminal and create a new service file for aMuled:

sudo nano /etc/systemd/system/amuled.service

  1. Add the following content to the service file:

[Unit]
Description=aMule Daemon
After=network.target

[Service]
ExecStart=/usr/local/bin/amuled -f -p /home/mzh/.aMule/amuled.pid
User=mzh
Group=mzh
PIDFile=/home/mzh/.aMule/amuled.pid
Restart=on-failure
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

  • Replace mzh with your actual username if needed.
  • The ExecStart command specifies the command to run the aMule daemon.
  • The User and Group ensure that the service runs under your user account.
  • PIDFile helps systemd manage the process.
  1. Reload systemd to apply changes:

sudo systemctl daemon-reload

  1. Enable the service to start on boot:

sudo systemctl enable amuled

  1. Start the aMuled service immediately:

sudo systemctl start amuled

  1. Check the status to ensure it is running:

sudo systemctl status amuled

If everything is set up correctly, aMuled should now start automatically whenever your Debian system boots.


举报

相关推荐

0 条评论