Commit 100e2f6c authored by Erik Wilson's avatar Erik Wilson

Provide INSTALL_K3S_SKIP_START environment variable

parent eabc1154
...@@ -22,6 +22,9 @@ set -e ...@@ -22,6 +22,9 @@ set -e
# - INSTALL_K3S_SKIP_DOWNLOAD # - INSTALL_K3S_SKIP_DOWNLOAD
# If set to true will not download k3s hash or binary. # 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 # - INSTALL_K3S_VERSION
# Version of k3s to download from github. Will attempt to download the # Version of k3s to download from github. Will attempt to download the
# latest version if not specified. # latest version if not specified.
...@@ -482,6 +485,7 @@ systemd_enable_and_start() { ...@@ -482,6 +485,7 @@ systemd_enable_and_start() {
$SUDO systemctl enable ${FILE_K3S_SERVICE} >/dev/null $SUDO systemctl enable ${FILE_K3S_SERVICE} >/dev/null
$SUDO systemctl daemon-reload >/dev/null $SUDO systemctl daemon-reload >/dev/null
[ "${INSTALL_K3S_SKIP_START}" = "true" ] && return
info "systemd: Starting ${SYSTEM_NAME}" info "systemd: Starting ${SYSTEM_NAME}"
$SUDO systemctl restart ${SYSTEM_NAME} $SUDO systemctl restart ${SYSTEM_NAME}
} }
...@@ -491,6 +495,7 @@ openrc_enable_and_start() { ...@@ -491,6 +495,7 @@ openrc_enable_and_start() {
info "openrc: Enabling ${SYSTEM_NAME} service for default runlevel" info "openrc: Enabling ${SYSTEM_NAME} service for default runlevel"
$SUDO rc-update add ${SYSTEM_NAME} default >/dev/null $SUDO rc-update add ${SYSTEM_NAME} default >/dev/null
[ "${INSTALL_K3S_SKIP_START}" = "true" ] && return
info "openrc: Starting ${SYSTEM_NAME}" info "openrc: Starting ${SYSTEM_NAME}"
$SUDO ${FILE_K3S_SERVICE} restart $SUDO ${FILE_K3S_SERVICE} restart
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment