[gnome-flashback/wip/systemd-user-units: 1/2] data: add systemd user units
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/systemd-user-units: 1/2] data: add systemd user units
- Date: Sat, 17 Aug 2019 11:27:53 +0000 (UTC)
commit 358b0352c5a66c8eb5f4ffe7d222085f2ad7340d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Aug 15 23:31:19 2019 +0300
data: add systemd user units
configure.ac | 1 +
data/Makefile.am | 1 +
data/systemd/Makefile.am | 30 ++++++++++++++++++++++
data/systemd/gnome-flashback.service.in | 21 +++++++++++++++
data/systemd/gnome-flashback.target | 10 ++++++++
...gnome-session-x11@gnome-flashback-compiz.target | 18 +++++++++++++
...ome-session-x11@gnome-flashback-metacity.target | 18 +++++++++++++
7 files changed, 99 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 7e61362..0380d79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,7 @@ AC_CONFIG_FILES([
data/menus/Makefile
data/schemas/Makefile
data/sessions/Makefile
+ data/systemd/Makefile
data/theme/Makefile
data/theme/Adwaita/Makefile
data/theme/HighContrast/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 4479e5b..7fe152b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = \
menus \
schemas \
sessions \
+ systemd \
theme \
ui \
xsessions \
diff --git a/data/systemd/Makefile.am b/data/systemd/Makefile.am
new file mode 100644
index 0000000..a6bb326
--- /dev/null
+++ b/data/systemd/Makefile.am
@@ -0,0 +1,30 @@
+NULL =
+
+service_in_files = gnome-flashback.service.in
+service_files = $(service_in_files:.service.in=.service)
+
+target_files = \
+ gnome-flashback.target \
+ gnome-session-x11@gnome-flashback-compiz.target \
+ gnome-session-x11@gnome-flashback-metacity.target \
+ $(NULL)
+
+systemduserdir = $(libdir)/systemd/user
+systemduser_DATA = \
+ $(service_files) \
+ $(target_files) \
+ $(NULL)
+
+%.service: %.service.in
+ $(AM_V_GEN) sed -e 's,[@]bindir[@],$(bindir),g' < $< > $@
+
+CLEANFILES = \
+ $(service_files) \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(service_in_files) \
+ $(target_files) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/systemd/gnome-flashback.service.in b/data/systemd/gnome-flashback.service.in
new file mode 100644
index 0000000..8950999
--- /dev/null
+++ b/data/systemd/gnome-flashback.service.in
@@ -0,0 +1,21 @@
+[Unit]
+Description=GNOME Flashback
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+CollectMode=inactive-or-failed
+
+After=gnome-session-manager.target
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+
+StartLimitIntervalSec=15s
+StartLimitBurst=3
+
+[Service]
+Type=dbus
+ExecStart=@bindir@/gnome-flashback
+Restart=on-failure
+RestartSec=0ms
+BusName=org.gnome.Shell
diff --git a/data/systemd/gnome-flashback.target b/data/systemd/gnome-flashback.target
new file mode 100644
index 0000000..fb83514
--- /dev/null
+++ b/data/systemd/gnome-flashback.target
@@ -0,0 +1,10 @@
+[Unit]
+Description=GNOME Flashback
+DefaultDependencies=no
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+
+Requires=gnome-flashback.service
+After=gnome-flashback.service
diff --git a/data/systemd/gnome-session-x11@gnome-flashback-compiz.target
b/data/systemd/gnome-session-x11@gnome-flashback-compiz.target
new file mode 100644
index 0000000..cbfd6f0
--- /dev/null
+++ b/data/systemd/gnome-session-x11@gnome-flashback-compiz.target
@@ -0,0 +1,18 @@
+[Unit]
+Description=GNOME Flashback Session
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+RefuseManualStart=no
+
+Conflicts=shutdown.target gnome-session-shutdown.target
+PartOf=graphical-session.target
+
+BindsTo=gnome-session@.target
+After=gnome-session@.target
+
+BindsTo=gnome-flashback.target
+After=gnome-flashback.target
+
+BindsTo=gnome-session.target
+After=gnome-session.target
diff --git a/data/systemd/gnome-session-x11@gnome-flashback-metacity.target
b/data/systemd/gnome-session-x11@gnome-flashback-metacity.target
new file mode 100644
index 0000000..cbfd6f0
--- /dev/null
+++ b/data/systemd/gnome-session-x11@gnome-flashback-metacity.target
@@ -0,0 +1,18 @@
+[Unit]
+Description=GNOME Flashback Session
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+RefuseManualStart=no
+
+Conflicts=shutdown.target gnome-session-shutdown.target
+PartOf=graphical-session.target
+
+BindsTo=gnome-session@.target
+After=gnome-session@.target
+
+BindsTo=gnome-flashback.target
+After=gnome-flashback.target
+
+BindsTo=gnome-session.target
+After=gnome-session.target
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]