penguin/monok8s

k8s image for Mono Gateway Dev Kit

alpine/rootfs-extra/etc/init.d/bootstrap-cluster

raw ยท 560 bytes

#!/sbin/openrc-run

export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

name="Bootstrap the Cluster"
description="Runs the ctl init bootstrap sequence"

command="/usr/local/bin/ctl"
command_args="init --env-file /opt/monok8s/config/cluster.env"

LOG_DIR="/var/log/monok8s"
LOG_FILE="$LOG_DIR/bootstrap-cluster.log"

depend() {
    need localmount
}

start() {
    checkpath --directory "$LOG_DIR"
    ebegin "Starting the bootstrap sequence"
    start-stop-daemon --start \
        --exec "$command" \
        -- $command_args >>"$LOG_FILE" 2>&1
    eend $?
}