Add dependency to x@vt7.service to the user session

This commit is contained in:
Alexander Grothe 2017-07-31 11:45:33 +02:00
parent ea5ea149f9
commit 07b00a68b2
3 changed files with 30 additions and 0 deletions

View File

@ -1407,6 +1407,7 @@ b'\xde\xad\xbe\xef'
with_items: with_items:
- /etc/systemd/system/x@.service.d/ - /etc/systemd/system/x@.service.d/
- /etc/systemd/system/vdr.service.d/ - /etc/systemd/system/vdr.service.d/
- '/etc/systemd/system/user@{{ vdr.uid }}.service.d/'
- name: add dependency to X-server for vdr.service using a drop-in - name: add dependency to X-server for vdr.service using a drop-in
template: template:
@ -1423,6 +1424,11 @@ b'\xde\xad\xbe\xef'
src: templates/systemd/vdr-environ.j2 src: templates/systemd/vdr-environ.j2
dest: /etc/systemd/system/vdr.service.d/load-environ.conf dest: /etc/systemd/system/vdr.service.d/load-environ.conf
- name: user@{{ vdr.uid }}.service depends on x@vt7.service
template:
src: templates/systemd/user@666.service.d/x-dependency.conf.j2
dest: '/etc/systemd/system/user@{{ vdr.uid }}.service.d/x-dependency.conf'
- name: start softhddevice detached and set audio to pulseaudio - name: start softhddevice detached and set audio to pulseaudio
lineinfile: lineinfile:
path: /etc/vdr/conf.avail/softhddevice.conf path: /etc/vdr/conf.avail/softhddevice.conf
@ -1642,6 +1648,17 @@ ExecStart=/usr/bin/x-daemon -logverbose 6 -noreset %I -config /etc/X11/xorg-debu
[Unit] [Unit]
Before=xlogin@{{ vdr.user }} Before=xlogin@{{ vdr.user }}
#+END_SRC #+END_SRC
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/user@666.service.d/x-dependency.conf.j2 :mkdirp yes :padline no
[Unit]
Wants=x@vt7.service
After=x@vt7.service
[Service]
TimeoutStopSec=20
KillMode=mixed
#+END_SRC
***** Drop-in snippet for vdr.service ***** Drop-in snippet for vdr.service
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no #+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no
# file: roles/yavdr-xorg/templates/vdr-xorg.conf # file: roles/yavdr-xorg/templates/vdr-xorg.conf

View File

@ -5,6 +5,7 @@
with_items: with_items:
- /etc/systemd/system/x@.service.d/ - /etc/systemd/system/x@.service.d/
- /etc/systemd/system/vdr.service.d/ - /etc/systemd/system/vdr.service.d/
- '/etc/systemd/system/user@{{ vdr.uid }}.service.d/'
- name: add dependency to X-server for vdr.service using a drop-in - name: add dependency to X-server for vdr.service using a drop-in
template: template:
@ -21,6 +22,11 @@
src: templates/systemd/vdr-environ.j2 src: templates/systemd/vdr-environ.j2
dest: /etc/systemd/system/vdr.service.d/load-environ.conf dest: /etc/systemd/system/vdr.service.d/load-environ.conf
- name: user@{{ vdr.uid }}.service depends on x@vt7.service
template:
src: templates/systemd/user@666.service.d/x-dependency.conf.j2
dest: '/etc/systemd/system/user@{{ vdr.uid }}.service.d/x-dependency.conf'
- name: start softhddevice detached and set audio to pulseaudio - name: start softhddevice detached and set audio to pulseaudio
lineinfile: lineinfile:
path: /etc/vdr/conf.avail/softhddevice.conf path: /etc/vdr/conf.avail/softhddevice.conf

View File

@ -0,0 +1,7 @@
[Unit]
Wants=x@vt7.service
After=x@vt7.service
[Service]
TimeoutStopSec=20
KillMode=mixed