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

systemd scripts for xlxd #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

systemd scripts for xlxd #185

wants to merge 1 commit into from

Conversation

jxmx
Copy link

@jxmx jxmx commented Jan 27, 2021

systemd-style service for xlxd

Copy link

@fabianfrz fabianfrz left a comment

Choose a reason for hiding this comment

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

This are just a few ideas of mine as someone who does a few things with systemd. I cannot speak for this project but maybe my review helps the maintainers.

ExecStart=/xlxd/xlxd ${REFLECTOR} ${BIND_IP} ${AMBED_IP}
ExecStartPost=/bin/sh -c 'umask 022; pgrep xlxd > /var/log/xlxd.pid'
Restart=on-abnormal
PIDFile=/var/log/xlxd.pid

Choose a reason for hiding this comment

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

this is a bad place for a pid file - should belong somewhere under /var/run/xlxd.pid

Actually it would make sense if the service would be able to write that file by itself.

It would be even better if the service would be of type notify because then it can tell systemd when it is actually ready, but then you need to link against libsystemd. See sd_notify.

After=network.target ambed.service

[Service]
Type=forking

Choose a reason for hiding this comment

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

for running in systemd, it would make more sense to compile it to not use the deamon mode and say simple. Then you can even use stdout / stderr for logging if you want.

@@ -0,0 +1,10 @@
# This is used by xlxd.service. Note this is shellcode sourced by xlxd.service

Choose a reason for hiding this comment

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

Suggested change
# This is used by xlxd.service. Note this is shellcode sourced by xlxd.service
# This is a systemd environment file loaded by xlxd.service

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.

2 participants