Explorar el Código

lockscreen and lockscreen-auto services

pull/1/head
padre
commit
c3d6da0852
Se han modificado 4 ficheros con 29 adiciones y 5 borrados
  1. +6
    -0
      tasks/clean.yaml
  2. +7
    -1
      tasks/lockscreen.yaml
  3. +13
    -0
      templates/lockscreen/lockscreen-auto.service.j2
  4. +3
    -4
      templates/lockscreen/lockscreen.service.j2

+ 6
- 0
tasks/clean.yaml Ver fichero

@@ -69,3 +69,9 @@
enabled: false
state: stopped
scope: user

- name: lockscreen graphical-session service disabled
systemd:
name: lockscreen.service
enabled: false
scope: user

+ 7
- 1
tasks/lockscreen.yaml Ver fichero

@@ -17,7 +17,13 @@
dest: ~/.config/systemd/user/lockscreen.service
notify: systemd daemon-reload

- name: lockscreen graphical-session service enabled
- name: lockscreen-auto graphical-session service
template:
src: lockscreen/lockscreen-auto.service.j2
dest: ~/.config/systemd/user/lockscreen-auto.service
notify: systemd daemon-reload

- name: lockscreen-auto graphical-session service enabled
systemd:
name: lockscreen.service
enabled: "{{ lockscreen_enabled }}"


+ 13
- 0
templates/lockscreen/lockscreen-auto.service.j2 Ver fichero

@@ -0,0 +1,13 @@
{{ ansible_managed | comment }}

[Unit]
Description=Screensaver
PartOf=graphical-session.target

[Service]
Type=simple
ExecStart=/usr/bin/xss-lock -l -- systemctl --user start lockscreen.service
Restart=always

[Install]
WantedBy=graphical-session.target

+ 3
- 4
templates/lockscreen/lockscreen.service.j2 Ver fichero

@@ -5,11 +5,10 @@ Description=Screensaver
PartOf=graphical-session.target

[Service]
Type=simple
ExecStart=/usr/bin/xss-lock -l -- xsecurelock
Type=notify
ExecStart=xsecurelock -- systemd-notify --ready
NotifyAccess=all
EnvironmentFile=%h/.lockscreen.env
Environment="XSECURELOCK_SAVER=%h/.screensaver.sh"
Restart=always

[Install]
WantedBy=graphical-session.target