mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Provide INSTALL_K3S_SKIP_START environment variable
This commit is contained in:
parent
eabc1154b1
commit
100e2f6c2f
@ -22,6 +22,9 @@ set -e
|
||||
# - INSTALL_K3S_SKIP_DOWNLOAD
|
||||
# If set to true will not download k3s hash or binary.
|
||||
#
|
||||
# - INSTALL_K3S_SKIP_START
|
||||
# If set to true will not start k3s service.
|
||||
#
|
||||
# - INSTALL_K3S_VERSION
|
||||
# Version of k3s to download from github. Will attempt to download the
|
||||
# latest version if not specified.
|
||||
@ -482,6 +485,7 @@ systemd_enable_and_start() {
|
||||
$SUDO systemctl enable ${FILE_K3S_SERVICE} >/dev/null
|
||||
$SUDO systemctl daemon-reload >/dev/null
|
||||
|
||||
[ "${INSTALL_K3S_SKIP_START}" = "true" ] && return
|
||||
info "systemd: Starting ${SYSTEM_NAME}"
|
||||
$SUDO systemctl restart ${SYSTEM_NAME}
|
||||
}
|
||||
@ -491,6 +495,7 @@ openrc_enable_and_start() {
|
||||
info "openrc: Enabling ${SYSTEM_NAME} service for default runlevel"
|
||||
$SUDO rc-update add ${SYSTEM_NAME} default >/dev/null
|
||||
|
||||
[ "${INSTALL_K3S_SKIP_START}" = "true" ] && return
|
||||
info "openrc: Starting ${SYSTEM_NAME}"
|
||||
$SUDO ${FILE_K3S_SERVICE} restart
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user