Unverified Commit 112e1339 authored by Hussein Galal's avatar Hussein Galal Committed by GitHub

Restore selinux context systemd unit file (#8593)

* Restore context of systemd unit file Signed-off-by: 's avatargalal-hussein <hussein.galal.ahmed.11@gmail.com> * Restore context of systemd unit file Signed-off-by: 's avatargalal-hussein <hussein.galal.ahmed.11@gmail.com> * update the hash of install.sh file Signed-off-by: 's avatargalal-hussein <hussein.galal.ahmed.11@gmail.com> --------- Signed-off-by: 's avatargalal-hussein <hussein.galal.ahmed.11@gmail.com>
parent 49411e70
...@@ -961,11 +961,16 @@ EOF ...@@ -961,11 +961,16 @@ EOF
# --- write systemd or openrc service file --- # --- write systemd or openrc service file ---
create_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 [ "${HAS_OPENRC}" = true ] && create_openrc_service_file
return 0 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 hashes of the current k3s bin and service files
get_installed_hashes() { get_installed_hashes() {
$SUDO sha256sum ${BIN_DIR}/k3s ${FILE_K3S_SERVICE} ${FILE_K3S_ENV} 2>&1 || true $SUDO sha256sum ${BIN_DIR}/k3s ${FILE_K3S_SERVICE} ${FILE_K3S_ENV} 2>&1 || true
......
3798b669b3ede25b2d3bfb9039a744604efb3681a351b2c1e0b01b7b05f0a434 install.sh ff8b7b4028299c878180c1288efa73205c54c7c3fbc2d313fcc666374526d221 install.sh
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