Users cannot run multiple monitor daemon because units name of
monitor daemon is now fixed to "ndctl-monitor.service" and users cannnot
change this name.

This patch is new unit file which reffers a single argument and change
their config file or service name. This is to run multiple monitor
daemon.

Units name can be parameterized by a single argument called the instance
name. The name of the full units is formed by inserting the instance
name between "@" and ".service", like "[email protected]".

In the unit file itself, the instance parameter may be referred to using
"%I". And each daemon reads each config file, like "monitor-foo.conf".
Same name as instance name must be used in config file between
"monitor" and ".conf".

Signed-off-by: Keisuke Sugita <[email protected]>
---
 ndctl/[email protected] | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 ndctl/[email protected]

diff --git a/ndctl/[email protected] b/ndctl/[email protected]
new file mode 100644
index 0000000..eb10702
--- /dev/null
+++ b/ndctl/[email protected]
@@ -0,0 +1,9 @@
+[Unit]
+Description=Ndctl Monitor Daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/ndctl monitor --config-file=/etc/ndctl/monitor-%I.conf
+
+[Install]
+WantedBy=multi-user.target
-- 
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to