Files
monok8s/alpine/rootfs-extra/etc/init.d/bootstrap-cluster
2026-03-26 19:33:15 +08:00

25 lines
476 B
Plaintext
Executable File

#!/sbin/openrc-run
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
name="Bootstrap cluster"
description="Apply cluster configurations using node.env from /opt/monok8s/config"
command="/opt/scripts/bootstrap-cluster.sh"
LOG_DIR="/var/log/monok8s"
LOG_FILE="$LOG_DIR/bootstrap.log"
depend() {
need apply-node-config
use net
}
start() {
checkpath --directory "$LOG_DIR"
ebegin "Applying cluster config"
"$command" >>"$LOG_FILE" 2>&1 &
eend $?
}