aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2016-10-23 09:01:58 +0000
committerBileto Bot <ci-train-bot@canonical.com>2016-10-23 09:01:58 +0000
commitaccdf3250ae140a3964ea97683ed23496798b968 (patch)
treec1be0ddbc4ec0b6c1f796bdfa1a16e126c8dde85 /data
parent285ce0ffd0aef8f689e943ae638af18f84f8b9a5 (diff)
parent2e85ab90f4acdcd548bbe40e3d13731f26f2e3d9 (diff)
downloadayatana-indicator-bluetooth-accdf3250ae140a3964ea97683ed23496798b968.tar.gz
ayatana-indicator-bluetooth-accdf3250ae140a3964ea97683ed23496798b968.tar.bz2
ayatana-indicator-bluetooth-accdf3250ae140a3964ea97683ed23496798b968.zip
Adding an systemd user session unit
Approved by: Martin Pitt, unity-api-1-bot
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am15
-rw-r--r--data/indicator-bluetooth.override1
-rw-r--r--data/indicator-bluetooth.service.in8
3 files changed, 24 insertions, 0 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 81f4d5e..9dd100b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -8,6 +8,21 @@ SUBDIRS = upstart
indicatorsdir = $(datadir)/unity/indicators
dist_indicators_DATA = com.canonical.indicator.bluetooth
+# the systemd unit file
+systemddir = $(SYSTEMD_USERDIR)
+systemd_DATA = indicator-bluetooth.service
+systemd_in = $(systemd_DATA:.service=.service.in)
+$(systemd_DATA): $(systemd_in)
+ $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
+BUILT_SOURCES += $(systemd_DATA)
+EXTRA_DIST += $(systemd_in)
+CLEANFILES += $(systemd_DATA)
+
+# the systemd upstart override
+upstart_overridedir = $(datadir)/upstart/systemd-session/upstart
+upstart_override_DATA = indicator-bluetooth.override
+EXTRA_DIST += $(upstart_override_DATA)
+
# the upstart job file
upstart_jobsdir = $(datadir)/upstart/sessions
upstart_jobs_DATA = indicator-bluetooth.conf
diff --git a/data/indicator-bluetooth.override b/data/indicator-bluetooth.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/data/indicator-bluetooth.override
@@ -0,0 +1 @@
+manual
diff --git a/data/indicator-bluetooth.service.in b/data/indicator-bluetooth.service.in
new file mode 100644
index 0000000..e99e610
--- /dev/null
+++ b/data/indicator-bluetooth.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Indicator Bluetooth Backend
+PartOf=graphical-session.target
+After=indicators-pre.target
+
+[Service]
+ExecStart=@pkglibexecdir@/indicator-bluetooth-service
+Restart=on-failure