From f0d6cfaae45d114141e47ce95996af32875922cd Mon Sep 17 00:00:00 2001 From: Paul Morgan Date: Tue, 26 Apr 2016 00:58:49 +0000 Subject: [PATCH] add systemd unit file Update the spec file with the rpm macro to put the unit file in the system-wide unit file directory based on: [root@1713bbf19a0b /]# rpmbuild --eval '%{_unitdir}' /usr/lib/systemd/system Allow user to create a drop directory to specify options via environment variables. Resolves https://github.com/purpleidea/mgmt/issues/12. --- README.md | 22 ++++++++++++++++++++++ TODO.md | 1 - misc/mgmt.service | 13 +++++++++++++ spec.in | 3 +++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 misc/mgmt.service diff --git a/README.md b/README.md index 438e78c9..970dd9f6 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,28 @@ If you have a well phrased question that might benefit others, consider asking i ## Examples: Please look in the [examples/](examples/) folder for more examples! +## Systemd: +See [`misc/mgmt.service`](misc/mgmt.service) for a sample systemd unit file. +This unit file is part of the RPM. + +To specify your custom options for `mgmt` on a systemd distro: + +```bash +sudo mkdir -p /etc/systemd/system/mgmt.service.d/ + +cat > /etc/systemd/system/mgmt.service.d/env.conf <