diff --git a/install.sh b/install.sh index 7ef592dc79..8c5fd97023 100644 --- a/install.sh +++ b/install.sh @@ -961,11 +961,16 @@ EOF # --- write systemd or openrc service file --- create_service_file() { - [ "${HAS_SYSTEMD}" = true ] && create_systemd_service_file + [ "${HAS_SYSTEMD}" = true ] && create_systemd_service_file && restore_systemd_service_file_context [ "${HAS_OPENRC}" = true ] && create_openrc_service_file return 0 } +restore_systemd_service_file_context() { + restorecon -R -i ${FILE_K3S_SERVICE} || true + restorecon -R -i ${FILE_K3S_ENV} || true +} + # --- get hashes of the current k3s bin and service files get_installed_hashes() { $SUDO sha256sum ${BIN_DIR}/k3s ${FILE_K3S_SERVICE} ${FILE_K3S_ENV} 2>&1 || true diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 6d5c29c3ca..d1e105edc1 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -3798b669b3ede25b2d3bfb9039a744604efb3681a351b2c1e0b01b7b05f0a434 install.sh +ff8b7b4028299c878180c1288efa73205c54c7c3fbc2d313fcc666374526d221 install.sh