Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a supported method to daemonize dms? #65

Closed
scottchiefbaker opened this issue Nov 8, 2019 · 5 comments
Closed

Is there a supported method to daemonize dms? #65

scottchiefbaker opened this issue Nov 8, 2019 · 5 comments

Comments

@scottchiefbaker
Copy link
Contributor

Is there a supported method to daemonize dms? Currently I'm just using:

nohup dms > /tmp/dms.log

This works, but it's not an elegant solution.

@royallthefourth
Copy link

I use a systemd service at ~/.config/systemd/user:

[Unit]
Description=UPnP Media Server

[Service]
ExecStart=/home/royall/go/bin/dms -path /home/royall/videos

[Install]
WantedBy=default.target

After adding the file, run systemctl --user enable dms.service && systemctl --user start dms.service

@scottchiefbaker
Copy link
Contributor Author

That worked really well actually. Good call.

FYI I learned you can use --now with system to save yourself duplicate commands. This will start and enable the service. For example:

systemctl --user --now enable dms.service

@scottchiefbaker
Copy link
Contributor Author

scottchiefbaker commented Dec 23, 2019

@anacrolix I think a systemd service file like this should be included in the repo. I'd like to submit a PR for this file, and update the docs to reflect how to utilize it. Where should the dms.service file go in the repo? Should I create a third_party folder, or a systemd folder, or just put in the root?

@anacrolix
Copy link
Owner

Let's put it in a systemd folder. That way it's clear what the purpose is, the .service file extension might not be enough on its own.

@scottchiefbaker
Copy link
Contributor Author

Closing this as PR #67 addresses this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants