mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Added optional file ./config/user-patches.sh which is executed between configuration and starting daemons (misc-section)
This commit is contained in:
parent
0e7e586ae3
commit
b01071f52f
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
|
||||
##########################################################################
|
||||
|
|
Loading…
Reference in a new issue