aboutsummaryrefslogtreecommitdiffstats
path: root/testing/minio/minio.initd
blob: 7a8afcbb0d8c2d1edd5fe8b71998c0b40a061fc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/sbin/openrc-run
supervisor=supervise-daemon
respawn_delay=5
respawn_max=0
healthcheck_timer=30

name='Minio Block Storage Server'
command=/usr/bin/minio
command_args="server \
    ${address:+--address=$address} \
    $MINIO_OPTS \
    $MINIO_VOLUMES"
command_user="minio:minio"

start_pre() {
    # the conf.d file might contain secrets!
    [ -f "/etc/conf.d/${RC_SVCNAME}" ] && checkpath --file --mode 0600 --owner root:root "/etc/conf.d/${RC_SVCNAME}"
    # make sure the default volume exists
    checkpath --directory --mode 0700 --owner minio:minio "/srv/${RC_SVCNAME}"
}

healthcheck() {
    [ -x /usr/bin/curl ] || return 0
    /usr/bin/curl -q "${address:-localhost:9000}"/minio/health/ready
}