Skip to content

Commit

Permalink
improve systemd file
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Jul 2, 2020
1 parent ff747b4 commit e55d16a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions templates/grafana-kiosk.service
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
[Unit]
Description=Grafana Kiosk
Documentation=https://github.com/grafana/grafana-kiosk.git
Documentation=https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv
Documentation=https://github.com/DO1JLR/role-grafana-kiosk.git
Documentation=https://github.com/grafana/grafana-kiosk.git
After=network.target

[Service]
User={{ grafana_kiosk.user }}
Restart = always
RestartSec=5s
Type=simple
Environment="{{ grafana_kiosk.display }}"
{% if not grafana_kiosk.general.autofit | bool -%}
Enviroment="KIOSK_AUTOFIT={{ grafana_kiosk.general.autofit | ternary("true", "false") }}"
{%- endif %}
Environment="XAUTHORITY=/home/{{ grafana_kiosk.user }}/.Xauthority"
ExecStart=/usr/bin/grafana-kiosk -c /etc/grafana-kiosk/config.yml
ExecStart=
{%- if not grafana_kiosk.general.autofit | bool -%}
KIOSK_AUTOFIT={{ grafana_kiosk.general.autofit | ternary("true", "false") }}{{ ' ' }}
{%- endif -%}
/usr/bin/grafana-kiosk -c /etc/grafana-kiosk/config.yml

[Install]
WantedBy=graphical.target
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ _dl_matrix:
'armv6l': "grafana-kiosk.linux.armv6"
'armv5l': "grafana-kiosk.linux.armv5"

playbook_version_number: 12 # should be an integer
playbook_version_number: 13 # should be an integer
playbook_version_path: 'role-grafana-kiosk_roles-ansible_github.com.version' # unique string

0 comments on commit e55d16a

Please sign in to comment.