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

Support for systemd #145

Closed
conqp opened this issue Mar 4, 2013 · 4 comments
Closed

Support for systemd #145

conqp opened this issue Mar 4, 2013 · 4 comments

Comments

@conqp
Copy link

conqp commented Mar 4, 2013

Hello folks,

I shortly moved my own minecraft server manager project (minectl) to sourceforge: http://sourceforge.net/p/minectl/code
On the way to publicizing it, I stumbled over the msm project, which I find quite interesting and is somewhat more extensive than mine.
Unfortunately it does not seem to support systemd yet, which I use on my Fedora-powered game server. Maybe you consider adding that.
Feel free to have a look at the code maybe you find some ideas useful and want to add it to msm.

Best regards,

Richard

@IronTetsubo
Copy link
Contributor

I've been poking at this a bit, as a part of adding fedora support. It ends up swapping around functionality a bit, in that at it's heart, msm is the init script, so it needs to exist even on non sysvinit systems. Accordingly, thoughts about changing the installer to install to /usr/local/bin/msm, and then link back to /etc/init.d (or whatever's appropriate for that system)? Current defaults are the reverse. Also, see issue #197 for more general installer discussion.

@FSMaxB
Copy link
Contributor

FSMaxB commented Oct 10, 2013

If you want to use systemd, a service unit is provided in the "init" directory of the repository. Just copy "msm.service" to "/etc/systemd/system/" and make sure that the msm init script is available as "/usr/local/bin/msm" either by creating a symlink (automatically done by installer and described on the page about installation) or by simply installting the init script to "/usr/local/bin/msm" (the second method might break the automatic update functionality).

Adittionaly to doing the service unit, I also did an arch linux install script which, however, installs the msm init script to "/etc/init.d/msm" and only symlinks to "/usr/loca/bin/msm" because in order to not install it into init.d I would have had to rewrite most of the common installation functions what I didn't want to do because I'm not that familiar with them and didn't want to break them (also the init scripts update functionalitiy is installing stuff to /etc/init.d so I would have had to mess with it, too)!

@DarkSpir
Copy link

No, msm.service should not go to /etc/systemd/system/ but to /usr/local/lib/systemd/system/. Reason is: If you change properties using systemctl set-properties they will go as a configuration snippet to /etc/systemd/system/ and this will fail if there's already a msm.service file present. One thing you have to keep in mind: /usr/local/ has to be part of the root partition, otherwise systemd won't be able to see this during system startup. There are distributions (like openSUSE when you install it with their btrfs layout) that puts /usr/local on a separate subvolume so you should check mount and change this if necessary.

@conqp
Copy link
Author

conqp commented Apr 19, 2022

After nine years I am no longer using msm (and neither Fedora). So I'll take the liberty of closing this one.

@conqp conqp closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants