Set gitea RuntimeDirectory

This commit is contained in:
Ryan Cavicchioni 2019-12-03 20:18:11 -06:00
parent 8b3ecdbb9c
commit 4f85a73714
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
3 changed files with 1 additions and 10 deletions

View File

@ -11,7 +11,6 @@ gitea_bin_path: /usr/local/bin
gitea_var_path: /var/lib/gitea gitea_var_path: /var/lib/gitea
gitea_log_path: /var/log/gitea gitea_log_path: /var/log/gitea
gitea_etc_path: /etc/gitea gitea_etc_path: /etc/gitea
gitea_run_path: /run/gitea
gitea_path: "{{ gitea_bin_path }}/gitea" gitea_path: "{{ gitea_bin_path }}/gitea"
gitea_config_path: "{{ gitea_etc_path }}/app.ini" gitea_config_path: "{{ gitea_etc_path }}/app.ini"
gitea_systemd_unit_path: /etc/systemd/system/gitea.service gitea_systemd_unit_path: /etc/systemd/system/gitea.service

View File

@ -58,14 +58,6 @@
state: directory state: directory
with_items: "{{ gitea_var_tree }}" with_items: "{{ gitea_var_tree }}"
- name: "create {{ gitea_run_path }} path"
file:
path: "{{ gitea_run_path }}"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: 0755
state: directory
- name: "create {{ gitea_log_path }} path" - name: "create {{ gitea_log_path }} path"
file: file:
path: "{{ gitea_log_path }}" path: "{{ gitea_log_path }}"

View File

@ -55,7 +55,7 @@ Group={{ gitea_group }}
WorkingDirectory={{ gitea_var_path }} WorkingDirectory={{ gitea_var_path }}
# If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
# (manually creating /run/gitea doesn't work, because it would not persist across reboots) # (manually creating /run/gitea doesn't work, because it would not persist across reboots)
#RuntimeDirectory=gitea RuntimeDirectory=gitea
ExecStart={{ gitea_path }} web --config {{ gitea_config_path }} ExecStart={{ gitea_path }} web --config {{ gitea_config_path }}
Restart=always Restart=always
Environment=USER={{ gitea_user }} HOME={{ gitea_home_path }} GITEA_WORK_DIR={{ gitea_var_path }} Environment=USER={{ gitea_user }} HOME={{ gitea_home_path }} GITEA_WORK_DIR={{ gitea_var_path }}