fix: disable some systemd security features on bionic (#2219)

Fixes #2217
This commit is contained in:
Jonas L 2022-10-10 16:57:56 +02:00 committed by GitHub
parent d726a097b0
commit d03fe5bf7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -283,6 +283,13 @@ install_service() {
-e "s|@@LOG_DIR@@|${LOG_DIR}|g" \
-e "s|@@WORKING_DIR@@|${WORKING_DIR}|g"
# TODO: Remove when Bionic support is dropped
if [[ $distro == "bionic" ]]; then
for feature in ProtectClock ProtectHostname ProtectKernelLogs ProtectProc; do
sed -i -e "s|^${feature}=|#${feature}=|" "$service_dest"
done
fi
chmod 0644 "$service_dest"
chown root:root "$service_dest"
systemctl enable "$service_name"