mirror of
https://github.com/friendica/docker
synced 2025-01-17 04:07:26 +01:00
Merge pull request #120 from nupplaphil/debian_buster
Switch to Debian Buster
This commit is contained in:
commit
b5a54c3296
16 changed files with 205 additions and 184 deletions
|
@ -1,5 +1,5 @@
|
|||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:7.3-apache-stretch
|
||||
FROM php:7.3-apache-buster
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
|
@ -10,7 +10,7 @@ RUN set -ex; \
|
|||
bzip2 \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
# For tini installation
|
||||
gnupg dirmngr \
|
||||
; \
|
||||
|
@ -35,7 +35,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
|
@ -109,7 +109,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
|
@ -7,7 +7,7 @@ RUN set -ex; \
|
|||
rsync \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
shadow \
|
||||
tini;
|
||||
|
||||
|
@ -16,7 +16,7 @@ RUN set -ex; \
|
|||
RUN set -ex; \
|
||||
\
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
$PHPIZE_DEPS \
|
||||
libpng-dev \
|
||||
|
@ -84,7 +84,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:7.3-fpm-stretch
|
||||
FROM php:7.3-fpm-buster
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
|
@ -10,7 +10,7 @@ RUN set -ex; \
|
|||
bzip2 \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
# For tini installation
|
||||
gnupg dirmngr \
|
||||
; \
|
||||
|
@ -35,7 +35,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
|
@ -109,7 +109,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:7.3-apache-stretch
|
||||
FROM php:7.3-apache-buster
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
|
@ -10,7 +10,7 @@ RUN set -ex; \
|
|||
bzip2 \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
# For tini installation
|
||||
gnupg dirmngr \
|
||||
; \
|
||||
|
@ -35,7 +35,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
|
@ -109,7 +109,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
|
@ -7,7 +7,7 @@ RUN set -ex; \
|
|||
rsync \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
shadow \
|
||||
tini;
|
||||
|
||||
|
@ -16,7 +16,7 @@ RUN set -ex; \
|
|||
RUN set -ex; \
|
||||
\
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
$PHPIZE_DEPS \
|
||||
libpng-dev \
|
||||
|
@ -84,7 +84,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:7.3-fpm-stretch
|
||||
FROM php:7.3-fpm-buster
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
|
@ -10,7 +10,7 @@ RUN set -ex; \
|
|||
bzip2 \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
# For tini installation
|
||||
gnupg dirmngr \
|
||||
; \
|
||||
|
@ -35,7 +35,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
|
@ -109,7 +109,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
|
@ -6,7 +6,7 @@ RUN set -ex; \
|
|||
rsync \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
shadow \
|
||||
tini;
|
||||
|
||||
|
@ -15,7 +15,7 @@ RUN set -ex; \
|
|||
RUN set -ex; \
|
||||
\
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
$PHPIZE_DEPS \
|
||||
libpng-dev \
|
||||
|
@ -83,7 +83,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM php:%%PHP_VERSION%%-%%VARIANT%%-stretch
|
||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%-buster
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
|
@ -9,7 +9,7 @@ RUN set -ex; \
|
|||
bzip2 \
|
||||
git \
|
||||
# For mail() support
|
||||
ssmtp \
|
||||
msmtp \
|
||||
# For tini installation
|
||||
gnupg dirmngr \
|
||||
; \
|
||||
|
@ -34,7 +34,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
bash \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
|
@ -108,7 +108,7 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
{ \
|
||||
echo sendmail_path = "/usr/sbin/sendmail -t -i"; \
|
||||
echo sendmail_path = "/usr/bin/msmtp -t"; \
|
||||
} > /usr/local/etc/php/conf.d/sendmail.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
|
|
|
@ -107,13 +107,13 @@ A valid SMTP-MTA would be, for example, `mx.example.org`.
|
|||
The following environment variables are possible for the SMTP examples.
|
||||
|
||||
- `SMTP` Address of the SMTP Mail-Gateway. (**required**)
|
||||
- `SMTP_PORT` Port of the SMTP Mail-Gateway. (Default: 587)
|
||||
- `SMTP_DOMAIN` The sender domain. (**required** - e.g. `friendica.local`)
|
||||
- `SMTP_FROM` Sender user-part of the address. (Default: `no-reply` - e.g. no-reply@friendica.local)
|
||||
- `SMTP_TLS` Use TLS for connecting the SMTP Mail-Gateway. (Default: empty)
|
||||
- `SMTP_STARTTLS` Use STARTTLS for connecting the SMTP Mail-Gateway. (Default: empty)
|
||||
- `SMTP_AUTH_USER` Username for the SMTP Mail-Gateway. (Default: empty)
|
||||
- `SMTP_AUTH_PASS` Password for the SMTP Mail-Gateway. (Default: empty)
|
||||
- `SMTP_AUTH_METHOD` Authentication method for the SMTP Mail-Gateway. (Default: empty/plain text)
|
||||
|
||||
## Database settings
|
||||
|
||||
|
|
|
@ -7,49 +7,54 @@ run_as() {
|
|||
if [ "$(id -u)" -eq 0 ]; then
|
||||
su - www-data -s /bin/sh "$@"
|
||||
else
|
||||
sh "$@"
|
||||
sh "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# checks if the the first parameter is greater than the second parameter
|
||||
version_greater() {
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
setup_msmtp() {
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
smtp_from=${SMTP_FROM:-no-reply}
|
||||
smtp_from="${SMTP_FROM:=no-reply}"
|
||||
|
||||
# Setup SSMTP
|
||||
# Setup MSMTP
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
|
||||
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" www-data
|
||||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
echo "www-data: $smtp_from@$SMTP_DOMAIN"
|
||||
echo "root: $smtp_from@$SMTP_DOMAIN"
|
||||
} >/etc/aliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
# create msmtp settings
|
||||
{
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "AuthPass=$SMTP_AUTH_PASS";fi
|
||||
if [ -n "${SMTP_AUTH_METHOD+x}" ]; then echo "AuthMethod=$SMTP_AUTH_METHOD"; fi
|
||||
} > /etc/ssmtp/ssmtp.conf
|
||||
echo "account default"
|
||||
echo "host $SMTP_DOMAIN"
|
||||
if [ -n "${SMTP_PORT+x}" ]; then echo "port $SMTP_PORT"; else echo "port 587"; fi
|
||||
echo "from $smtp_from@$SMTP_DOMAIN"
|
||||
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user $SMTP_AUTH_USER"; fi
|
||||
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password $SMTP_AUTH_PASS"; fi
|
||||
echo "logfile /var/log/msmtp.log"
|
||||
echo "aliases /etc/aliases"
|
||||
} >/etc/msmtprc
|
||||
|
||||
echo "Setup finished"
|
||||
fi
|
||||
}
|
||||
|
||||
setup_msmtp
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
installed_version="0.0.0.0"
|
||||
|
@ -65,8 +70,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
||||
# check it just in case the version is greater or if we force the upgrade
|
||||
if version_greater "$image_version" "$installed_version" || [ "${FRIENDICA_UPGRADE:-false}" = "true" ]; then
|
||||
echo "Initializing Friendica $image_version ..."
|
||||
|
|
Loading…
Reference in a new issue