-
Notifications
You must be signed in to change notification settings - Fork 115
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# This is used by xlxd.service. Note this is shellcode sourced by xlxd.service | |
# This is a systemd environment file loaded by xlxd.service |
systemd-style service for xlxd