-
Notifications
You must be signed in to change notification settings - Fork 116
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This is used by xlxd.service. Note this is shellcode sourced by xlxd.service | ||
|
||
# Enter XLX name/number here | ||
REFLECTOR="XLXnnn" | ||
|
||
# Enter IP for binding here | ||
BIND_IP="0.0.0.0" | ||
|
||
# Change this is ambed is running on a different host | ||
AMBED_IP="127.0.0.1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=XLXD Multiprotocol Reflector | ||
After=network.target ambed.service | ||
|
||
[Service] | ||
Type=forking | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
User=root | ||
Group=root | ||
EnvironmentFile=/etc/default/xlxd | ||
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 commentThe 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 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. |
||
|
||
[Install] | ||
WantedBy=multi-user.target |
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.