Skip to content

add systemd support #2

Closed
zhou13 opened this Issue Aug 27, 2013 · 9 comments

2 participants

@zhou13
zhou13 commented Aug 27, 2013

systemd is very popular now. Any plan to add systemd support?

Currently, I use a very simple systemd configuration:

[Unit]
Description=ISATAP Client for Linux
After=network.target nss-lookup.target

[Service]
EnvironmentFile=/etc/conf.d/isatapd
ExecStart=/usr/sbin/isatapd ${DAEMON_OPTS} ${ISATAP_ROUTERS}

[Install]
WantedBy=multi-user.target

But it lacks some configuration. It is hard to archive it only by add a service file.

One way to solve this problem is that isatapd can read some environment variable as its default value.

@shlusiak
Owner
@zhou13
zhou13 commented Aug 29, 2013

The problem is that systemd does not support shell-like programming. So you could not write code like

[ -n "${ISATAP_LINK}" ] && DAEMON_OPTS="${DAEMON_OPTS} --link ${ISATAP_LINK}"

You can only write

ExecStart=/usr/sbin/isatapd ${ISATAP_ROUTERS}

The problem is some options' default cannot be set such as --link. There is no way to set it to auto except for not writting this option.

Hope you catch what I mean.

The code change should be: automatically uses environment variable as options' default.

@shlusiak
Owner
@zhou13
zhou13 commented Aug 29, 2013

I think that's enough.

@zhou13
zhou13 commented Aug 31, 2013

For tracking and information propose, here is my gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=482690

@shlusiak
Owner

Current master (commit 5cacef6) adds the value 'auto' to the parameters --name, --link and --interval, which effectively ignores and uses the binary or kernel defaults.
This should ease configuration file handling for you. Can you please have a look if that is enough?

@zhou13
zhou13 commented Sep 19, 2013

I think so. Could you make a new release?

@shlusiak
Owner
@shlusiak shlusiak closed this Sep 22, 2013
@shlusiak
Owner

If you have some generic systemd configuration snippets I'll be happy to include it in the source tarball

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.