Minor syntax/correctness tweaks

This commit is contained in:
Tianon Gravi 2019-12-30 16:53:22 -08:00
parent ba2daa0a68
commit 199eeec6c8
17 changed files with 79 additions and 72 deletions

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp

View File

@ -13,7 +13,7 @@ RUN set -ex; \
# see https://friendi.ca/resources/requirements/
RUN set -ex; \
\
apk add -U --no-cache --virtual .build-deps \
apk add --no-cache --virtual .build-deps \
mysql-client \
bash \
$PHPIZE_DEPS \
@ -67,8 +67,8 @@ RUN set -ex; \
| sort -u \
| awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .friendica-phpext-rundeps $runDeps; \
apk del .build-deps;
apk add --no-network --virtual .friendica-phpext-rundeps $runDeps; \
apk del --no-network .build-deps;
# set recommended PHP.ini settings
RUN set -ex; \

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp

View File

@ -13,7 +13,7 @@ RUN set -ex; \
# see https://friendi.ca/resources/requirements/
RUN set -ex; \
\
apk add -U --no-cache --virtual .build-deps \
apk add --no-cache --virtual .build-deps \
mysql-client \
bash \
$PHPIZE_DEPS \
@ -67,8 +67,8 @@ RUN set -ex; \
| sort -u \
| awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .friendica-phpext-rundeps $runDeps; \
apk del .build-deps;
apk add --no-network --virtual .friendica-phpext-rundeps $runDeps; \
apk del --no-network .build-deps;
# set recommended PHP.ini settings
RUN set -ex; \

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp

View File

@ -12,7 +12,7 @@ RUN set -ex; \
# see https://friendi.ca/resources/requirements/
RUN set -ex; \
\
apk add -U --no-cache --virtual .build-deps \
apk add --no-cache --virtual .build-deps \
mysql-client \
bash \
$PHPIZE_DEPS \
@ -66,8 +66,8 @@ RUN set -ex; \
| sort -u \
| awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .friendica-phpext-rundeps $runDeps; \
apk del .build-deps;
apk add --no-network --virtual .friendica-phpext-rundeps $runDeps; \
apk del --no-network .build-deps;
# set recommended PHP.ini settings
RUN set -ex; \

View File

@ -8,5 +8,6 @@ done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi

View File

@ -28,16 +28,16 @@ setup_ssmtp() {
# add possible mail-senders
{
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
} > /etc/ssmtp/revaliases;
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
echo "root::$smtp_from@$HOSTNAME:$SMTP"
} > /etc/ssmtp/revaliases
# replace ssmtp.conf settings
{
echo "root=:$smtp_from@$HOSTNAME" ;
echo "hostname=$HOSTNAME" ;
echo "mailhub=$SMTP" ;
echo "FromLineOverride=YES" ;
echo "root=:$smtp_from@$HOSTNAME"
echo "hostname=$HOSTNAME"
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
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# no downgrading possible
if version_greater "$installed_version" "$image_version"; then
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
exit 1;
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
exit 1
fi
setup_ssmtp