change systemd unit into templated unit, that the %i which is used
inside the unit is working
Signed-off-by: Henry Hirsch <henry.hirsch@1und1.de>
%files -n ceph-exporter
%{_bindir}/ceph-exporter
-%{_unitdir}/ceph-exporter.service
+%{_unitdir}/ceph-exporter@.service
%files -n rbd-fuse
%{_bindir}/rbd-fuse
+++ /dev/null
-[Unit]
-Description=Ceph cluster exporter daemon
-PartOf=ceph.target
-After=network-online.target local-fs.target
-Before=ceph.target
-Wants=network-online.target local-fs.target ceph.target ceph-mon.target
-
-[Service]
-ExecReload=/bin/kill -HUP $MAINPID
-ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph
-LockPersonality=true
-NoNewPrivileges=true
-PrivateDevices=yes
-PrivateTmp=true
-ProtectControlGroups=true
-ProtectHome=true
-ProtectHostname=true
-ProtectKernelLogs=true
-ProtectKernelModules=true
-ProtectKernelTunables=true
-ProtectSystem=full
-Restart=on-failure
-RestartSec=10
-RestrictSUIDSGID=true
-StartLimitBurst=3
-StartLimitInterval=30min
-
-[Install]
-WantedBy=multi-user.target ceph.target
--- /dev/null
+[Unit]
+Description=Ceph cluster exporter daemon
+PartOf=ceph.target
+After=network-online.target local-fs.target
+Before=ceph.target
+Wants=network-online.target local-fs.target ceph.target ceph-mon.target
+
+[Service]
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph
+LockPersonality=true
+NoNewPrivileges=true
+PrivateDevices=yes
+PrivateTmp=true
+ProtectControlGroups=true
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelLogs=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectSystem=full
+Restart=on-failure
+RestartSec=10
+RestrictSUIDSGID=true
+StartLimitBurst=3
+StartLimitInterval=30min
+
+[Install]
+WantedBy=multi-user.target ceph.target