[phodav] spice: add systemd unit files
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] spice: add systemd unit files
- Date: Wed, 5 Feb 2014 11:21:48 +0000 (UTC)
commit 76e7c9b9c7c0941d79a1617d7179314da83029ed
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Fri Jan 31 14:47:43 2014 +0100
spice: add systemd unit files
Makefile.am | 8 ++++++++
configure.ac | 2 ++
data/70-spice-webdavd.rules | 1 +
data/spice-webdavd.service | 12 ++++++++++++
data/spice-webdavd.target | 2 ++
5 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index b5a2d82..5b5d1e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -66,6 +66,14 @@ chezdav_LDADD = \
$(AVAHI_LIBS) \
$(NULL)
+systemdunitdir = $(SYSTEMDSYSTEMUNITDIR)
+systemdunit_DATA = \
+ $(top_srcdir)/data/spice-webdavd.service \
+ $(top_srcdir)/data/spice-webdavd.target
+
+udevrulesdir = /lib/udev/rules.d
+udevrules_DATA = $(top_srcdir)/data/70-spice-webdavd.rules
+
BUILT_SOURCES += $(top_srcdir)/.version
$(top_srcdir)/.version:
@echo $(VERSION) > $ -t && mv $ -t $@
diff --git a/configure.ac b/configure.ac
index e1e5174..ca96ec4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,6 +101,8 @@ else
have_pie=no
fi
+SYSTEMDSYSTEMUNITDIR=`${PKG_CONFIG} systemd --variable=systemdsystemunitdir`
+AC_SUBST(SYSTEMDSYSTEMUNITDIR)
AC_ARG_VAR([XMLTO], [Path to xmlto command])
AC_PATH_PROG([XMLTO], [xmlto])
diff --git a/data/70-spice-webdavd.rules b/data/70-spice-webdavd.rules
new file mode 100644
index 0000000..0088be3
--- /dev/null
+++ b/data/70-spice-webdavd.rules
@@ -0,0 +1 @@
+ACTION=="add", SUBSYSTEM=="virtio-ports", ENV{DEVLINKS}=="/dev/virtio-ports/org.spice-space.webdav.0",
ENV{SYSTEMD_WANTS}="spice-webdavd.target"
diff --git a/data/spice-webdavd.service b/data/spice-webdavd.service
new file mode 100644
index 0000000..d74ee87
--- /dev/null
+++ b/data/spice-webdavd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=webdav daemon for Spice guests
+After=dbus.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/sysconfig/spice-webdavd
+ExecStart=/usr/sbin/spice-webdavd -p 9843 $SPICE_WEBDAVD_EXTRA_ARGS
+Restart=on-success
+
+[Install]
+WantedBy=spice-webdavd.target
diff --git a/data/spice-webdavd.target b/data/spice-webdavd.target
new file mode 100644
index 0000000..7417025
--- /dev/null
+++ b/data/spice-webdavd.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=webdav daemon for Spice guests
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]