aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-08-27 11:46:32 -0500
committerTed Gould <ted@gould.cx>2013-08-27 11:46:32 -0500
commit667bae7b6050a2346046a8482dd2bd758025fa00 (patch)
tree2004150fb96e90abe0f70efb1b8eb1ad597e2bf4
parent7c271b3ced3eb39f804f02c20cd536f6782423c3 (diff)
downloadayatana-indicator-power-667bae7b6050a2346046a8482dd2bd758025fa00.tar.gz
ayatana-indicator-power-667bae7b6050a2346046a8482dd2bd758025fa00.tar.bz2
ayatana-indicator-power-667bae7b6050a2346046a8482dd2bd758025fa00.zip
Switching the dvus service to an upstart job
-rw-r--r--data/Makefile.am16
-rw-r--r--data/indicator-power.conf.in14
-rw-r--r--data/indicator-power.service.in3
3 files changed, 22 insertions, 11 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 68cd662..9aed4e3 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -10,17 +10,17 @@ indicatorsdir = $(prefix)/share/unity/indicators
dist_indicators_DATA = com.canonical.indicator.power
#
-# the dbus service file
+# the upstart job file
#
-dbus_servicesdir = $(datadir)/dbus-1/services
-dbus_services_DATA = indicator-power.service
-dbus_services_in = $(dbus_services_DATA:.service=.service.in)
-$(dbus_services_DATA): $(dbus_services_in)
+upstart_jobsdir = $(datadir)/upstart/sessions
+upstart_jobs_DATA = indicator-power.conf
+upstart_jobs_in = $(upstart_jobs_DATA:.conf=.conf.in)
+$(upstart_jobs_DATA): $(upstart_jobs_in)
$(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
-BUILT_SOURCES += $(dbus_services_DATA)
-CLEANFILES += $(dbus_services_DATA)
-EXTRA_DIST += $(dbus_services_in)
+BUILT_SOURCES += $(upstart_jobs_DATA)
+CLEANFILES += $(upstart_jobs_DATA)
+EXTRA_DIST += $(upstart_jobs_in)
#
# the gettings
diff --git a/data/indicator-power.conf.in b/data/indicator-power.conf.in
new file mode 100644
index 0000000..327e9f3
--- /dev/null
+++ b/data/indicator-power.conf.in
@@ -0,0 +1,14 @@
+description "Indicator Power Backend"
+
+# Want to move to indicator-services-[start|end], but that's not all
+# there yet. Use the signals that exist today for now.
+
+start on indicators-loaded or indicator-services-start
+stop on desktop-end or indicator-services-end
+
+env G_MESSAGES_DEBUG=all
+export G_MESSAGES_DEBUG
+
+respawn
+
+exec @pkglibexecdir@/indicator-power-service
diff --git a/data/indicator-power.service.in b/data/indicator-power.service.in
deleted file mode 100644
index 0702e8b..0000000
--- a/data/indicator-power.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.canonical.indicator.power
-Exec=@pkglibexecdir@/indicator-power-service