mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 18:25:41 +03:00
Upgrade to new release. Modify init.d script to add "after cgroups docker" to ensure Nomad is started after cgroups and docker. Create /etc/cni and /usr/lib/nomad/plugins directories. Disable AWS, Azure, DigitalOcean, and GCE fingerprinting by default.
38 lines
846 B
Bash
38 lines
846 B
Bash
#!/sbin/openrc-run
|
|
name="Nomad"
|
|
description="An easy-to-use, flexible, and performant workload orchestrator"
|
|
description_healthcheck="Check health status"
|
|
description_reload="Reload configuration"
|
|
|
|
extra_started_commands="healthcheck reload"
|
|
|
|
command="/usr/sbin/${RC_SVCNAME}"
|
|
command_args="${nomad_opts}"
|
|
command_user="root:root"
|
|
|
|
supervisor=supervise-daemon
|
|
output_log="/var/log/${RC_SVCNAME}.log"
|
|
error_log="/var/log/${RC_SVCNAME}.log"
|
|
respawn_max=0
|
|
respawn_delay=10
|
|
healthcheck_timer=60
|
|
|
|
depend() {
|
|
need net
|
|
after cgroups docker firewall
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -f -m 0644 -o "$command_user" "$output_log" "$error_log"
|
|
}
|
|
|
|
healthcheck() {
|
|
$command agent-info ${nomad_healthcheck_opts} > /dev/null 2>&1
|
|
}
|
|
|
|
reload() {
|
|
start_pre \
|
|
&& ebegin "Reloading $RC_SVCNAME configuration" \
|
|
&& $supervisor "$RC_SVCNAME" --signal HUP
|
|
eend $?
|
|
}
|