Skip to content

Commit

Permalink
Fix default value (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
ostefano committed Aug 20, 2024
1 parent da02fb9 commit 3fbf7bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/files/entrypoint_fpm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

[ -z "$REDIS_FQDN" ] && REDIS_FQDN=redis

term_proc() {
echo "Entrypoint FPM caught SIGTERM signal!"
echo "Killing process $master_pid"
Expand All @@ -10,6 +8,9 @@ term_proc() {

trap term_proc SIGTERM

[ -z "$REDIS_FQDN" ] && REDIS_FQDN=redis
[ -z "$REDIS_PASSWORD" ] && REDIS_PASSWORD=redispassword

change_php_vars() {
for FILE in /etc/php/*/fpm/php.ini
do
Expand All @@ -19,7 +20,7 @@ change_php_vars() {
sed -i "s/upload_max_filesize = .*/upload_max_filesize = 50M/" "$FILE"
sed -i "s/post_max_size = .*/post_max_size = 50M/" "$FILE"
sed -i "s/session.save_handler = .*/session.save_handler = redis/" "$FILE"
sed -i "s|.*session.save_path = .*|session.save_path = '$(echo $REDIS_FQDN | grep -E '^\w+://' || echo tcp://$REDIS_FQDN):6379${REDIS_PASSWORD:+?auth=${REDIS_PASSWORD}}'|" "$FILE"
sed -i "s|.*session.save_path = .*|session.save_path = '$(echo $REDIS_FQDN | grep -E '^\w+://' || echo tcp://$REDIS_FQDN):6379?auth=${REDIS_PASSWORD}'|" "$FILE"
sed -i "s/session.sid_length = .*/session.sid_length = 64/" "$FILE"
sed -i "s/session.use_strict_mode = .*/session.use_strict_mode = 1/" "$FILE"
done
Expand Down

0 comments on commit 3fbf7bf

Please sign in to comment.