mirror of
https://github.com/friendica/docker
synced 2025-12-07 22:07:09 +01:00
Adding logfile at startup
This commit is contained in:
parent
4ae908d4f5
commit
6579e49be8
17 changed files with 87 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue