Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
uib-ub
Drift
roller-ansible
clarin-dspace
Commits
50c12d86
Commit
50c12d86
authored
Nov 12, 2020
by
Oyvind.Gjesdal
Browse files
update to simple service, success exit code, change setype to bin_t use local path for script
parent
d2acaeda
Changes
2
Hide whitespace changes
Inline
Side-by-side
tasks/handle-server.yml
View file @
50c12d86
...
...
@@ -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"
...
...
templates/handle-server.service.j2
View file @
50c12d86
...
...
@@ -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') }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment