diff options
author | Ted Gould <ted@gould.cx> | 2014-09-09 04:21:58 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-09-09 04:21:58 +0000 |
commit | 4b15eb106da8764c3bd12e746b8f19bf458b7470 (patch) | |
tree | 299d5e2a5cdaab892fe7c92b9405f721635124e3 | |
parent | 059246d136ed8c24c5e78e6a966bf2dfc945fe4e (diff) | |
parent | 334e3b3130cbde5a96e6da5323d40418db80f8ef (diff) | |
download | ayatana-indicator-power-4b15eb106da8764c3bd12e746b8f19bf458b7470.tar.gz ayatana-indicator-power-4b15eb106da8764c3bd12e746b8f19bf458b7470.tar.bz2 ayatana-indicator-power-4b15eb106da8764c3bd12e746b8f19bf458b7470.zip |
Synchronize process management across indicators
Approved by: Charles Kerr, PS Jenkins bot
-rw-r--r-- | data/CMakeLists.txt | 21 | ||||
-rw-r--r-- | data/indicator-power.conf.in | 8 | ||||
-rw-r--r-- | data/indicator-power.desktop.in | 4 | ||||
-rw-r--r-- | data/indicator-power.upstart.desktop.in | 10 |
4 files changed, 36 insertions, 7 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 51fc415..0750128 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -55,6 +55,27 @@ install (FILES "${XDG_AUTOSTART_FILE}" DESTINATION "${XDG_AUTOSTART_DIR}") ## +## Upstart XDG Autostart Override +## + +# where to install +set (UPSTART_XDG_AUTOSTART_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/upstart/xdg/autostart") +message (STATUS "${UPSTART_XDG_AUTOSTART_DIR} is the Upstart XDG autostart override dir") + +set (UPSTART_XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.upstart.desktop") +set (UPSTART_XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_XDG_AUTOSTART_NAME}") +set (UPSTART_XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_XDG_AUTOSTART_NAME}.in") + +# build it +set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") +configure_file ("${UPSTART_XDG_AUTOSTART_FILE_IN}" "${UPSTART_XDG_AUTOSTART_FILE}") + +# install it +install (FILES "${UPSTART_XDG_AUTOSTART_FILE}" + DESTINATION "${UPSTART_XDG_AUTOSTART_DIR}" + RENAME "${XDG_AUTOSTART_NAME}") + +## ## Unity Indicator File ## diff --git a/data/indicator-power.conf.in b/data/indicator-power.conf.in index a2bc7aa..665fb35 100644 --- a/data/indicator-power.conf.in +++ b/data/indicator-power.conf.in @@ -1,11 +1,9 @@ -description "Indicator Power Backend" +description "Indicator Power Service" -# 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 +start on indicator-services-start stop on desktop-end or indicator-services-end respawn +respawn limit 2 10 exec @pkglibexecdir@/indicator-power-service diff --git a/data/indicator-power.desktop.in b/data/indicator-power.desktop.in index 28025a2..c2fd54c 100644 --- a/data/indicator-power.desktop.in +++ b/data/indicator-power.desktop.in @@ -2,8 +2,8 @@ Type=Application Name=Indicator Power Exec=@pkglibexecdir@/indicator-power-service -NotShowIn=Unity; +OnlyShowIn=Unity;GNOME; NoDisplay=true StartupNotify=false Terminal=false - +AutostartCondition=GNOME3 unless-session gnome diff --git a/data/indicator-power.upstart.desktop.in b/data/indicator-power.upstart.desktop.in new file mode 100644 index 0000000..5f95f8e --- /dev/null +++ b/data/indicator-power.upstart.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=Indicator Power +Exec=@pkglibexecdir@/indicator-power-service +OnlyShowIn=Unity;GNOME; +NoDisplay=true +StartupNotify=false +Terminal=false +AutostartCondition=GNOME3 unless-session gnome +Hidden=true |