geekman / mdns-repeater

mDNS repeater
GNU General Public License v2.0
190 stars 58 forks source link

Running mdns-repeater as service in Debian #9

Closed sjoerdj closed 3 years ago

sjoerdj commented 3 years ago

Hi, I really like this great piece of software, but unfurtunately I cannot get it running as a service without failing after a while. I am using the following mdns-repeater.service file:

[Unit] Description=mDNS Repeater Wants=network-online.target After=network-online.target

[Service] Type=simple ExecStart=/home/user/mdns-repeater/mdns-repeater eth0 tun0

[Install] WantedBy=multi-user.target

Problem is that:

Could you please provide me with the best practice settings for an mdns-repeater.service in Debian that will make mdns-repeater run as a stable service? Thanks a lot!

kennylevinsen commented 3 years ago

If it crashes you will need to provide information about the crash in the form of a backtrace (see coredumpctl).

Any foreground command that works in your shell should do. You shouldn't be running system services out of your home folder though. Put it in /usr/local/bin or something.

sjoerdj commented 3 years ago

Thanks, Kenny! Running it from /usr/local/bin did the trick. By the way, in order to prevent syslog from becoming overflowed, I added the following line to the service section in the mdns-repeater.service file:

StandardOutput=null