Commit 07507ece authored by Markus Frosch's avatar Markus Frosch 📣

Add systemd service

parent 5062238f
Pipeline #5297 passed with stages
in 3 minutes and 36 seconds
......@@ -2,7 +2,9 @@ Source: icingaweb2-module-vspheredb
Section: admin
Priority: optional
Maintainer: Icinga Development Team <info@icinga.com>
Build-Depends: debhelper (>= 9)
Build-Depends:
debhelper (>= 9),
dh-systemd
Standards-Version: 3.9.8
Homepage: https://www.icinga.com
......
[Unit]
Description=Icinga vSphereDB Daemon
Documentation=https://icinga.com/docs/icinga-vsphere/latest/
Wants=network.target
[Service]
Type=notify
User=www-data
ExecStart=/usr/bin/icingacli vspheredb daemon run
; For debugging purposes:
; ExecStart=/usr/bin/icingacli vspheredb daemon run --trace --debug
User=icingaweb2
NotifyAccess=main
WatchdogSec=10
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
......@@ -5,11 +5,17 @@ MODULE_NAME := vspheredb
MODULE_PATH := /usr/share/icingaweb2/modules/$(MODULE_NAME)
%:
dh $@
dh $@ --with systemd
override_dh_auto_install:
mkdir debian/tmp
mkdir -p debian/tmp$(MODULE_PATH)
find -maxdepth 1 ! -name debian ! -name ".*" -exec cp -rvt debian/tmp$(MODULE_PATH) {} \;
override_dh_systemd_enable:
dh_systemd_enable --no-enable --name=icinga-$(MODULE_NAME)
override_dh_systemd_start:
dh_systemd_start --no-start --name=icinga-$(MODULE_NAME)
# vi: ts=4 sw=4 noexpandtab :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment