Restore selinux context systemd unit file (#8593)

* Restore context of systemd unit file

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Restore context of systemd unit file

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update the hash of install.sh file

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
This commit is contained in:
Hussein Galal 2023-10-31 22:54:09 +02:00 committed by GitHub
parent 49411e7084
commit 112e1339b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -1 +1 @@
3798b669b3ede25b2d3bfb9039a744604efb3681a351b2c1e0b01b7b05f0a434 install.sh
ff8b7b4028299c878180c1288efa73205c54c7c3fbc2d313fcc666374526d221 install.sh