From 2becf486f2819a3148111b132ea9d4f04367710b Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 19 Nov 2024 13:42:42 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .gitea/workflows/docker.7.yaml .gitea/workflows/docker.8.yaml .gitea/workflows/docker.yaml rootfs/root/docker/setup/06-post.sh tmp/etc/php.ini tmp/etc/php/php.ini --- .gitea/workflows/docker.7.yaml | 2 +- .gitea/workflows/docker.8.yaml | 2 +- .gitea/workflows/docker.yaml | 2 +- rootfs/root/docker/setup/06-post.sh | 14 +++++++++++--- tmp/etc/{php => }/php.ini | 0 5 files changed, 14 insertions(+), 6 deletions(-) rename tmp/etc/{php => }/php.ini (100%) diff --git a/.gitea/workflows/docker.7.yaml b/.gitea/workflows/docker.7.yaml index 0f49dc8..a7f76e8 100644 --- a/.gitea/workflows/docker.7.yaml +++ b/.gitea/workflows/docker.7.yaml @@ -1,4 +1,4 @@ -name: release-tag +name: php-7 on: push diff --git a/.gitea/workflows/docker.8.yaml b/.gitea/workflows/docker.8.yaml index 6aba4e9..7ff8e66 100644 --- a/.gitea/workflows/docker.8.yaml +++ b/.gitea/workflows/docker.8.yaml @@ -1,4 +1,4 @@ -name: release-tag +name: php-8 on: push diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml index e161f43..2936282 100644 --- a/.gitea/workflows/docker.yaml +++ b/.gitea/workflows/docker.yaml @@ -1,4 +1,4 @@ -name: release-tag +name: php-latestr on: push diff --git a/rootfs/root/docker/setup/06-post.sh b/rootfs/root/docker/setup/06-post.sh index 9d81745..ca35361 100755 --- a/rootfs/root/docker/setup/06-post.sh +++ b/rootfs/root/docker/setup/06-post.sh @@ -24,11 +24,19 @@ set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set env variables exitCode=0 -if [ -d "/etc/php/php-fpm" ]; then rm -Rf "/etc/php/php-fpm"; fi -if [ -d "/etc/php/php-fpm.d" ]; then rm -Rf "/etc/php/php-fpm.d"; fi +php_ini=$(find /etc/php* -name 'php.ini' | grep -v '/etc/php$' | head -n1 | grep '^' || false) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Predifined actions - +if [ -d "/etc/php/php-fpm" ]; then rm -Rf "/etc/php/php-fpm"; fi +if [ -d "/etc/php/php-fpm.d" ]; then rm -Rf "/etc/php/php-fpm.d"; fi +if [ -n "$php_ini" ]; then + php_dir="$(dirname "$php_ini")" + if [ $php_dir != "/etc/php" ]; then + [ -L "/etc/php" ] || unlink /etc/php + ln -sf "$php_dir" /etc/php + [ -f "/etc/php.ini" ] && mv -f "/etc/php.ini" "/etc/php/php.ini" + fi +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Main script diff --git a/tmp/etc/php/php.ini b/tmp/etc/php.ini similarity index 100% rename from tmp/etc/php/php.ini rename to tmp/etc/php.ini