Skip to content
Snippets Groups Projects
Commit ea59dd32 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

add a systemd unit file


This restores the configuration when started and clears it when shut down.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 20d6ca58
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ Source: nvmetcli
Section: python
Priority: optional
Maintainer: Christoph Hellwig <hch@lst.de>
Build-Depends: debhelper(>= 8), python, python-setuptools, dh-python
Build-Depends: debhelper(>= 8), python, python-setuptools, dh-python, dh-systemd (>= 1.5)
Standards-Version: 3.9.4
Package: nvmetcli
......
nvmetcli /usr/sbin
nvmet.service /lib/systemd/system
......@@ -8,7 +8,7 @@ export http_proxy = http://127.0.0.1:9
%:
dh $@ --with python2
dh $@ --with python2 --with systemd
override_dh_auto_build:
python setup.py build
......
[Unit]
Description=Restore NVMe kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/nvmetcli restore
ExecStop=/usr/sbin/nvmetcli clear
SyslogIdentifier=nvmetcli
[Install]
WantedBy=multi-user.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment