Place the PHP version into a variable (#2307)

Also
- trims a few trailing whitespace characters
- gitignores VS code workspace
This commit is contained in:
Michael Heuberger
2023-12-20 10:04:35 +13:00
parent 8e4e9add78
commit 2a0cd8bfd8
13 changed files with 647 additions and 703 deletions
+2
View File
@@ -4,6 +4,8 @@
# -o pipefail: don't ignore errors in the non-last command in a pipeline
set -euo pipefail
# This global variable pinpoints the PHP version for the whole MiaB app
# Upgrade it only with care and tests. Nextcloud versions depend on it.
PHP_VER=8.0
function hide_output {
+1 -1
View File
@@ -124,7 +124,7 @@ chmod a+r /var/lib/mailinabox/mozilla-autoconfig.xml
# Create a generic mta-sts.txt file which is exposed via the
# nginx configuration at /.well-known/mta-sts.txt
# more documentation is available on:
# more documentation is available on:
# https://www.uriports.com/blog/mta-sts-explained/
# default mode is "enforce". In /etc/mailinabox.conf change
# "MTA_STS_MODE=testing" which means "Messages will be delivered
+2 -2
View File
@@ -41,7 +41,7 @@ if [ $needs_update == 1 ]; then
mv /tmp/z-push/*/src /usr/local/lib/z-push
rm -rf /tmp/z-push.zip /tmp/z-push
# Create admin and top scripts with PHP_VER
# Create admin and top scripts with PHP_VER
rm -f /usr/sbin/z-push-{admin,top}
echo '#!/bin/bash' > /usr/sbin/z-push-admin
echo php$PHP_VER /usr/local/lib/z-push/z-push-admin.php '"$@"' >> /usr/sbin/z-push-admin
@@ -49,7 +49,7 @@ if [ $needs_update == 1 ]; then
echo '#!/bin/bash' > /usr/sbin/z-push-top
echo php$PHP_VER /usr/local/lib/z-push/z-push-top.php '"$@"' >> /usr/sbin/z-push-top
chmod 755 /usr/sbin/z-push-top
echo $VERSION > /usr/local/lib/z-push/version
fi