diff options
author | nachoparker <nacho@ownyourbits.com> | 2022-03-07 20:17:20 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2022-03-07 21:36:27 +0300 |
commit | cd98b50da7b3f7f840d264e87c51533fd1d10f4c (patch) | |
tree | df1c2379805469b1d2058aeb7ae386707cd16d50 | |
parent | 21b7fe70f0c64a3cd20f08afed072832a43f21e0 (diff) |
docker: adjust PHP version in apache configv1.46.9
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r-- | bin/ncp-docker-hook | 11 | ||||
-rwxr-xr-x | build/docker/lamp/010lamp | 8 | ||||
-rw-r--r-- | changelog.md | 8 |
3 files changed, 23 insertions, 4 deletions
diff --git a/bin/ncp-docker-hook b/bin/ncp-docker-hook new file mode 100644 index 00000000..eb288f71 --- /dev/null +++ b/bin/ncp-docker-hook @@ -0,0 +1,11 @@ +# Here we have the opportunity to make changes in the persistent volume configuration before +# anything is started, after pulling a new image + +# adjust PHP version (in case of php upgrade) +if php --version | grep -q v7.4 && [[ -f /data/etc/apache2/conf-available/php7.3-fpm.conf ]]; then + a2disconf php7.3-fpm + mv /data/etc/apache2/conf-available/php7.{3,4}-fpm.conf + sed -i 's|php7.3|php7.4|g' /data/etc/apache2/conf-available/php7.4-fpm.conf + a2enconf php7.4-fpm +fi + diff --git a/build/docker/lamp/010lamp b/build/docker/lamp/010lamp index ca55dd6e..e7ca59c1 100755 --- a/build/docker/lamp/010lamp +++ b/build/docker/lamp/010lamp @@ -18,8 +18,14 @@ set -e # MOVE CONFIGS TO PERSISTENT VOLUME persistent_cfg /etc/apache2 +# Run hardcoded hooks. This allows scripts in the image to change persistent values before +# initialization. Use case is to download a new image. +if [[ -f /usr/local/bin/ncp-docker-hook ]]; then + source /usr/local/bin/ncp-docker-hook +fi + echo "Starting PHP-fpm" -php-fpm${PHPVER} +php-fpm"${PHPVER}" echo "Starting Apache" /usr/sbin/apache2ctl start diff --git a/changelog.md b/changelog.md index f99779fe..1d175780 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,11 @@ -[v1.46.8](https://github.com/nextcloud/nextcloudpi/commit/dc7046b) (2022-03-04) SSH: cannot check for default password because of Debian bug #1003151 +[v1.46.9](https://github.com/nextcloud/nextcloudpi/commit/db56128) (2022-03-07) docker: adjust PHP version in apache config -[v1.46.7](https://github.com/nextcloud/nextcloudpi/commit/f473f73) (2022-03-04) nc-hdd-monitor: fix Bullseye service name +[v1.46.8 ](https://github.com/nextcloud/nextcloudpi/commit/21b7fe7) (2022-03-04) SSH: cannot check for default password because of Debian bug #1003151 -[v1.46.6](https://github.com/nextcloud/nextcloudpi/commit/c9610e4) (2022-03-03) ncp-dist-upgrade: fix VM grub-pc issue +[v1.46.7 ](https://github.com/nextcloud/nextcloudpi/commit/f473f73) (2022-03-04) nc-hdd-monitor: fix Bullseye service name + +[v1.46.6 ](https://github.com/nextcloud/nextcloudpi/commit/c9610e4) (2022-03-03) ncp-dist-upgrade: fix VM grub-pc issue [v1.46.5 ](https://github.com/nextcloud/nextcloudpi/commit/062c803) (2022-03-02) ncp-dist-upgrade: add DHCP fix for raspios |