mirror of
https://github.com/tomav/docker-mailserver
synced 2025-08-31 06:15:28 +00:00
Added optional file ./config/user-patches.sh which is executed between configuration and starting daemons (misc-section)
This commit is contained in:
6
config/user-patches.sh
Normal file
6
config/user-patches.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
##
|
||||
# This user script will be executed between configuration and starting daemons
|
||||
##
|
||||
|
@@ -195,6 +195,7 @@ function register_functions() {
|
||||
################### >> misc funcs
|
||||
|
||||
_register_misc_function "_misc_save_states"
|
||||
_register_misc_function "_misc_user_patches"
|
||||
|
||||
################### << misc funcs
|
||||
|
||||
@@ -1595,6 +1596,18 @@ function _misc_save_states() {
|
||||
fi
|
||||
}
|
||||
|
||||
function _misc_user_patches() {
|
||||
notify 'inf' 'Executing user-patches.sh'
|
||||
|
||||
if [ -f /tmp/docker-mailserver/user-patches.sh ]; then
|
||||
chmod +x /tmp/docker-mailserver/user-patches.sh
|
||||
bash /tmp/docker-mailserver/user-patches.sh
|
||||
notify 'inf' "user-patches.sh executed"
|
||||
else
|
||||
notify 'inf' "user-patches.sh not executed because optional '/tmp/docker-mailserver/user-patches.sh' is not provided."
|
||||
fi
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
# >> Start Daemons
|
||||
##########################################################################
|
||||
|
Reference in New Issue
Block a user