Skip to content

Commit b8d7d1f

Browse files
committed
Adding logfile at startup
1 parent 38122dc commit b8d7d1f

17 files changed

Lines changed: 10 additions & 17 deletions

File tree

2024.12/apache/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ RUN set -ex; \
66
\
77
apt-get update; \
88
apt-get install -y --no-install-recommends \
9-
sudo \
109
rsync \
1110
bzip2 \
1211
# For mail() support

2024.12/apache/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sh /setup_msmtp.sh
4444

4545
# ensure we have a logfile writeable by www-data
4646
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
47-
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
47+
if runuser --login www-data --command "test -w \"$(dirname \"$FRIENDICA_LOGFILE\")"; then
4848
touch "$FRIENDICA_LOGFILE"
4949
chown www-data:www-data "$FRIENDICA_LOGFILE"
5050
fi

2024.12/fpm-alpine/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sh /setup_msmtp.sh
4444

4545
# ensure we have a logfile writeable by www-data
4646
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
47-
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
47+
if runuser --login www-data --command "test -w \"$(dirname \"$FRIENDICA_LOGFILE\")"; then
4848
touch "$FRIENDICA_LOGFILE"
4949
chown www-data:www-data "$FRIENDICA_LOGFILE"
5050
fi

2024.12/fpm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ RUN set -ex; \
66
\
77
apt-get update; \
88
apt-get install -y --no-install-recommends \
9-
sudo \
109
rsync \
1110
bzip2 \
1211
# For mail() support

2024.12/fpm/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sh /setup_msmtp.sh
4444

4545
# ensure we have a logfile writeable by www-data
4646
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
47-
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
47+
if runuser --login www-data --command "test -w \"$(dirname \"$FRIENDICA_LOGFILE\")"; then
4848
touch "$FRIENDICA_LOGFILE"
4949
chown www-data:www-data "$FRIENDICA_LOGFILE"
5050
fi

2025.02-dev/apache/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ RUN set -ex; \
66
\
77
apt-get update; \
88
apt-get install -y --no-install-recommends \
9-
sudo \
109
rsync \
1110
bzip2 \
1211
# For mail() support

2025.02-dev/apache/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sh /setup_msmtp.sh
4444

4545
# ensure we have a logfile writeable by www-data
4646
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
47-
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
47+
if runuser --login www-data --command "test -w \"$(dirname \"$FRIENDICA_LOGFILE\")"; then
4848
touch "$FRIENDICA_LOGFILE"
4949
chown www-data:www-data "$FRIENDICA_LOGFILE"
5050
fi

2025.02-dev/fpm-alpine/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sh /setup_msmtp.sh
4444

4545
# ensure we have a logfile writeable by www-data
4646
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
47-
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
47+
if runuser --login www-data --command "test -w \"$(dirname \"$FRIENDICA_LOGFILE\")"; then
4848
touch "$FRIENDICA_LOGFILE"
4949
chown www-data:www-data "$FRIENDICA_LOGFILE"
5050
fi

2025.02-dev/fpm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ RUN set -ex; \
66
\
77
apt-get update; \
88
apt-get install -y --no-install-recommends \
9-
sudo \
109
rsync \
1110
bzip2 \
1211
# For mail() support

2025.02-dev/fpm/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sh /setup_msmtp.sh
4444

4545
# ensure we have a logfile writeable by www-data
4646
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
47-
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
47+
if runuser --login www-data --command "test -w \"$(dirname \"$FRIENDICA_LOGFILE\")"; then
4848
touch "$FRIENDICA_LOGFILE"
4949
chown www-data:www-data "$FRIENDICA_LOGFILE"
5050
fi

0 commit comments

Comments
 (0)