mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-17 00:01:28 +02:00
chore: make permission adjustments happen on restart too
Signed-off-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
fbba865c6c
commit
a6fe9f5bcc
2 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue