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

26 lines
560 B
Plaintext
Executable File

#!/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 $?
}