修改service systemd文件路径

This commit is contained in:
fumingwei
2021-05-14 10:18:03 +08:00
parent 320c7cfdc0
commit 3eb2e99b0c
10 changed files with 17 additions and 295 deletions

View File

@@ -52,15 +52,15 @@
dest: /etc/tmpfiles.d/sapp_tmpfile.conf
tags: template
- name: "Template sapp.service destination server"
- name: "sapp: service adapts runtimes"
template:
src: "{{ role_path }}/templates/sapp.service.j2"
dest: /usr/lib/systemd/system/sapp.service
mode: 0755
dest: /usr/lib/systemd/system/sapp.service.d/
mode: 0644
- name: "copy memory limit file to sapp.service.d"
copy:
src: "{{ role_path }}/files/memory.conf"
dest: /etc/systemd/system/sapp.service.d/
dest: /usr/lib/systemd/system/sapp.service.d/
mode: 0644

View File

@@ -0,0 +1,9 @@
[Unit]
Requires=mrzcpd.service
After=mrzcpd.service
[Service]
TimeoutSec=900s
RestartSec=10s
LimitNOFILE=524288
LimitCORE=0
WatchdogSec=10s

View File

@@ -1,21 +0,0 @@
[Unit]
Description=sapp service
Requires=mrzcpd.service
After=mrzcpd.service
[Service]
Type=notify
WorkingDirectory=/home/mesasoft/sapp_run
ExecStart=/home/mesasoft/sapp_run/sapp
TimeoutSec=900s
RestartSec=10s
Restart=always
LimitNOFILE=524288
LimitNPROC=infinity
LimitCORE=0
TasksMax=infinity
Delegate=yes
KillMode=process
WatchdogSec=10s
[Install]
WantedBy=multi-user.target