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

Improve debian systemd service file. #168

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Niluge-KiWi
Copy link

  • better description and documentation
  • use spectrum2 dedicated user
  • restart on failure, without spamming other servers
  • no need for a short TimeoutStopSec: spectrum2 supposedly correctly shuts down
  • no need for Alias: the current filename is already OK
  • add WantedBy=multi-user.target for install

* better description and documentation
* use spectrum2 dedicated user
* restart on failure, without spamming other servers
* no need for a short TimeoutStopSec: spectrum2 supposedly correctly shuts down
* no need for Alias: the current filename is already OK
* add WantedBy=multi-user.target for install
@Niluge-KiWi
Copy link
Author

This requires more packaging change such as user creation, various directories permissions for the new user, etc...
I don't know how to do that though.

@vitalyster
Copy link
Collaborator

Take a look at some examples: user creation and directories permissions

@Niluge-KiWi
Copy link
Author

I worked in the systemd service file because it's easy to develop and test
and I wanted non-root user.
It works on my server so I opened this PR.

But I won't work on trying to correctly build the .deb. It works enough on
my server for me to not invest more time on it.
Maybe someone else will pick up the job !

Le mer. 19 oct. 2016 10:55, vitalyster [email protected] a écrit :

Take a look at some examples: user creation
https://anonscm.debian.org/cgit/pkg-xmpp/jabberd2.git/tree/debian/preinst
and directories permissions
https://anonscm.debian.org/cgit/pkg-xmpp/jabberd2.git/tree/debian/postinst


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#168 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAQEYwEhCpd8AqNSc-BfjRYHWnc02Zfjks5q1dsegaJpZM4KZGVK
.

@dos1
Copy link
Contributor

dos1 commented Apr 4, 2018

I don't think the user should be specified in systemd service file, since you can specify users and groups in spectrum transports config files, which seems to work fine for me.

If you want to get non-root user by default in the deb, the package should create system user and have the user/group entries in the example config files uncommented.

Other stuff looks nice 👍

@thundergreen
Copy link
Contributor

What's missing is systemd for the server (webserver) to register

Copy link
Contributor

@stv0g stv0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

Is @Niluge-KiWi still interested to merge this?
Or shall I create a new PR?

After=network.target

[Service]
Type=forking

User=spectrum2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As proposed by others, I propose to drop this line for the sake of an easier setup and leave dropping the privileges to spectrum_manager.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using systemd-sysusers?

@vitalyster vitalyster marked this pull request as draft July 17, 2020 07:07
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

Successfully merging this pull request may close these issues.

7 participants