chore: make permission adjustments happen on restart too

Signed-off-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
georglauterbach 2025-01-19 10:51:51 +01:00
parent fbba865c6c
commit a6fe9f5bcc
No known key found for this signature in database
GPG key ID: F367F7C43C118578
2 changed files with 5 additions and 3 deletions

View file

@ -122,8 +122,6 @@ function _register_functions() {
_register_setup_function '_setup_logwatch'
_register_setup_function '_setup_save_states'
# TODO
_register_setup_function '_setup_apply_fixes_after_configuration'
_register_setup_function '_setup_adjust_state_permissions'
if [[ ${ENABLE_MTA_STS} -eq 1 ]]; then
@ -131,6 +129,9 @@ function _register_functions() {
_register_start_daemon '_start_daemon_mta_sts_daemon'
fi
# ! Must be the last setup function
_register_setup_function '_setup_directory_and_file_permissions'
_register_setup_function '_setup_run_user_patches'
# ? >> Daemons
@ -191,6 +192,7 @@ if [[ -f /CONTAINER_START ]]; then
_log 'info' 'Container was restarted. Skipping most setup routines.'
# We cannot skip all setup routines because some need to run _after_
# the initial setup (and hence, they cannot be moved to the check stack).
_setup_directory_and_file_permissions
_setup_adjust_state_permissions
else
_setup

View file

@ -82,7 +82,7 @@ function _setup_timezone() {
fi
}
function _setup_apply_fixes_after_configuration() {
function _setup_directory_and_file_permissions() {
_log 'trace' 'Removing leftover PID files from a stop/start'
find /var/run/ -not -name 'supervisord.pid' -name '*.pid' -delete
touch /dev/shm/supervisor.sock