feat: make mcaptcha systemd service wait on deps
This commit is contained in:
parent
7e9f0a3633
commit
1c17a3f3d9
2 changed files with 19 additions and 14 deletions
|
@ -42,9 +42,9 @@
|
||||||
|
|
||||||
- name: Copy mCaptcha systemd servicefile
|
- name: Copy mCaptcha systemd servicefile
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: ./artifacts/mcaptcha/mcaptcha.service
|
src: ./templates/mcaptcha/mcaptcha.service.j2
|
||||||
dest: /etc/systemd/system/
|
dest: /etc/systemd/system/mcaptcha.service
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
force: true
|
force: true
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: Copy mCaptcha systemd servicefile
|
- name: Copy mCaptcha config file
|
||||||
become: true
|
become: true
|
||||||
notify: restart mcaptcha
|
notify: restart mcaptcha
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
@ -2,18 +2,23 @@
|
||||||
Description=mCaptcha: PoW CAPTCHA system
|
Description=mCaptcha: PoW CAPTCHA system
|
||||||
After=syslog.target
|
After=syslog.target
|
||||||
After=network.target
|
After=network.target
|
||||||
###
|
|
||||||
# Don't forget to add the database service dependencies
|
{% if cache_type == 'redis' %}
|
||||||
###
|
Wants=redis.service
|
||||||
#
|
After=redis.service
|
||||||
#Wants=mariadb.service
|
{% endif %}
|
||||||
#After=mariadb.service
|
|
||||||
#
|
{% if database_type == 'postgres' %}
|
||||||
Wants=postgresql.service
|
Wants=postgresql.service
|
||||||
After=postgresql.service
|
After=postgresql.service
|
||||||
#
|
{% endif %}
|
||||||
#Wants=redis.service
|
|
||||||
#After=redis.service
|
{% if database_type == 'mariadb' %}
|
||||||
|
Wants=mariadb.service
|
||||||
|
After=mariadb.service
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
RestartSec=2s
|
RestartSec=2s
|
Loading…
Reference in a new issue