Commit 50c12d86 authored by Oyvind.Gjesdal's avatar Oyvind.Gjesdal
Browse files

update to simple service, success exit code, change setype to bin_t use local path for script

parent d2acaeda
......@@ -7,11 +7,16 @@
set_fact:
handle_startup_script_path: "/usr/local/scripts/start-handle-server"
- name: "create directory for startup script"
file:
path: "/usr/local/scripts"
state: "directory"
- name: "template handle server start script (not using dspace version due to problems setting sefcontext on nfs4)"
template:
src: "start-handle-server.j2"
dest: "{{ handle_startup_script_path }}"
setype: "systemd_sysctl_exec_t"
setype: "bin_t"
- name: "set permissions for startup script"
file:
......@@ -23,7 +28,7 @@
- name: "allow selinux context for systemd for start-handle-server script"
sefcontext:
target: "{{ handle_startup_script_path }}"
setype: "systemd_sysctl_exec_t"
setype: "bin_t"
seuser: "system_u"
- name: "restorecon on handleserver start script"
......
......@@ -34,9 +34,10 @@ Description=Handle Service
After=syslog.target network.target
[Service]
Type=forking
ExecStart={{ build_dir }}/bin/start-handle-server
Type=simple
ExecStart=/usr/local/scripts/start-handle-server
ExecStop=/bin/kill $MAINPID
SuccessExitStatus=143
User={{ dspace_clarin_handle_user | default('tomcat') }}
Group={{ dspace_clarin_handle_group | default('tomcat') }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment