mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-26 19:27:23 +01:00
Fully working docker!
This commit is contained in:
committed by
Joshua Tauberer
parent
299a5c6355
commit
51d89a780d
@@ -39,6 +39,7 @@ function apt_get_quiet {
|
||||
}
|
||||
|
||||
function apt_install {
|
||||
if [ ! "$IS_DOCKER" ];then
|
||||
# Report any packages already installed.
|
||||
PACKAGES=$@
|
||||
TO_INSTALL=""
|
||||
@@ -165,20 +166,6 @@ function restart_service {
|
||||
if [ ! "$IS_DOCKER" ]; then
|
||||
# The normal way to restart a service.
|
||||
hide_output service $1 restart
|
||||
else
|
||||
# On docker, sysvinit is not present. Our base image provides
|
||||
# a weird way to manage running services. But we're not going
|
||||
# to use it. Just execute the init.d script directly.
|
||||
|
||||
if [ "$1" == "dovecot" ]; then
|
||||
# Dovecot does not provide an init.d script. It just provides
|
||||
# an upstart init configuration. But Docker doesn't provide
|
||||
# upstart. Start Dovecot specially.
|
||||
killall dovecot
|
||||
dovecot -c /etc/dovecot/dovecot.conf
|
||||
else
|
||||
hide_output /etc/init.d/$1 restart
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ if [ ! -d $STORAGE_ROOT ]; then
|
||||
fi
|
||||
if [ ! -f $STORAGE_ROOT/mailinabox.version ]; then
|
||||
echo $(setup/migrate.py --current) > $STORAGE_ROOT/mailinabox.version
|
||||
chown $STORAGE_USER.$STORAGE_USER $STORAGE_ROOT/mailinabox.version
|
||||
chown $STORAGE_USER:$STORAGE_USER $STORAGE_ROOT/mailinabox.version
|
||||
fi
|
||||
|
||||
|
||||
@@ -140,3 +140,4 @@ openssl x509 -in $STORAGE_ROOT/ssl/ssl_certificate.pem -noout -fingerprint \
|
||||
echo
|
||||
echo Then you can confirm the security exception and continue.
|
||||
echo
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ EOF
|
||||
|
||||
# Create writable directories.
|
||||
mkdir -p /var/log/roundcubemail /tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
|
||||
chown -R www-data.www-data /var/log/roundcubemail /tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
|
||||
chown -R www-data:www-data /var/log/roundcubemail /tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
|
||||
|
||||
# Password changing plugin settings
|
||||
# The config comes empty by default, so we need the settings
|
||||
@@ -147,9 +147,9 @@ usermod -a -G dovecot www-data
|
||||
|
||||
# set permissions so that PHP can use users.sqlite
|
||||
# could use dovecot instead of www-data, but not sure it matters
|
||||
chown root.www-data $STORAGE_ROOT/mail
|
||||
chown root:www-data $STORAGE_ROOT/mail
|
||||
chmod 775 $STORAGE_ROOT/mail
|
||||
chown root.www-data $STORAGE_ROOT/mail/users.sqlite
|
||||
chown root:www-data $STORAGE_ROOT/mail/users.sqlite
|
||||
chmod 664 $STORAGE_ROOT/mail/users.sqlite
|
||||
|
||||
# Enable PHP modules.
|
||||
|
||||
Reference in New Issue
Block a user