mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
split the pid files2
This commit is contained in:
parent
46861cbfec
commit
0bfab81d35
1 changed files with 3 additions and 3 deletions
|
@ -80,7 +80,7 @@
|
|||
dest: /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||
|
||||
- name: shove {{ nginx_dir }}/nginx.conf into unit file
|
||||
command: sed -i 's|/usr/sbin/nginx|/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf|' /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||
command: sed -i 's|/usr/sbin/nginx|/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf|g' /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||
# lineinfile:
|
||||
# path: /etc/systemd/system/nginx.service
|
||||
# state: present
|
||||
|
@ -91,8 +91,8 @@
|
|||
# - { regexp: '^ExecStart=/usr/sbin/nginx', line: 'ExecStart=/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf' }
|
||||
# - { regexp: '^ExecReload=/usr/sbin/nginx', line: 'ExecReload=/usr/sbin/nginx -c {{ nginx_dir }}/nginx.conf' }
|
||||
|
||||
- name: Alter PIDFile= to match {{ systemd_unit_name }} in unit file.
|
||||
command: sed -i 's|PIDFile=/run/nginx.pid|PIDFile=/run/{{ systemd_unit_name }}.pid|' /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||
- name: Alter /run/nginx.pid to be /run/{{ systemd_unit_name }}.pid in unit file.
|
||||
command: sed -i 's|/run/nginx.pid|/run/{{ systemd_unit_name }}.pid|g' /etc/systemd/system/{{ systemd_unit_name }}.service
|
||||
|
||||
# end block
|
||||
when: systemd_unit_name != "nginx" or nginx_dir != "/etc/nginx"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue