From 37f9eda50b2ed73050415aa844e1e708ca76f1c4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 May 2021 17:21:05 +0200 Subject: [PATCH] [yolo] Handle different default php version for witness file --- lib/common.sh | 3 +++ lib/witness.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 16cdb68..a658a81 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -19,6 +19,9 @@ LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test" readonly lock_file="./pcheck.lock" +DEFAULT_PHP_VERSION="7.3" +[[ "$DIST" == "bullseye" ]] && DEFAULT_PHP_VERSION="7.4" + #================================================= # LXC helpers #================================================= diff --git a/lib/witness.sh b/lib/witness.sh index 7ffb626..3a4e212 100644 --- a/lib/witness.sh +++ b/lib/witness.sh @@ -28,7 +28,7 @@ set_witness_files () { create_witness_file "/var/log/witnessfile" file # Config fpm - create_witness_file "/etc/php/7.3/fpm/pool.d/witnessfile.conf" file + create_witness_file "/etc/php/$DEFAULT_PHP_VERSION/fpm/pool.d/witnessfile.conf" fime # Config logrotate create_witness_file "/etc/logrotate.d/witnessfile" file @@ -72,7 +72,7 @@ check_witness_files () { check_file_exist "/var/log/witnessfile" # Config fpm - check_file_exist "/etc/php/7.3/fpm/pool.d/witnessfile.conf" + check_file_exist "/etc/php/$DEFAULT_PHP_VERSION/fpm/pool.d/witnessfile.conf" # Config logrotate check_file_exist "/etc/logrotate.d/witnessfile"