From 37704a6d3350e79b92cbb7b5aab676a3b234e3f1 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 12 Feb 2024 22:09:22 +0100 Subject: [PATCH] Run as user in systemd service --- templates/etebase.service.j2 | 2 ++ vars/main.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/etebase.service.j2 b/templates/etebase.service.j2 index 9459b7f..717fce0 100644 --- a/templates/etebase.service.j2 +++ b/templates/etebase.service.j2 @@ -4,6 +4,8 @@ Description=Execute the etebase server. [Service] +User={{ etebase__user }} +Group={{ etebase__group }} WorkingDirectory={{ etebase__user_home }}/etebase_{{ etebase_version_target }} ExecStart={{ etebase__venv }}/bin/uvicorn etebase_server.asgi:application --uds {{ etebase__socket }} Restart=always diff --git a/vars/main.yml b/vars/main.yml index bea2c5c..4579d2d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -4,5 +4,5 @@ etebase__repo_api: 'https://api.github.com/repos/etesync/server/tags' etebase__venv: "{{ etebase__venv_path }}/{{ etebase_version_target }}" # versionscheck -playbook_version_number: 17 # should be a integer +playbook_version_number: 18 # should be a integer playbook_version_path: 'role-do1jlr.etebase'