summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd')
-rw-r--r--app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd21
1 files changed, 21 insertions, 0 deletions
diff --git a/app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd b/app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd
new file mode 100644
index 000000000000..58bd3bbf2b45
--- /dev/null
+++ b/app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=${RC_PREFIX%/}/run/${SVCNAME}.pid
+
+name="fusioninventory-agent daemon"
+description="FusionInventroy agent"
+command=/usr/bin/fusioninventory-agent
+command_args="--daemon --pidfile ${pidfile} ${FUSIONINVENTORY_OPTIONS}"
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}