aboutsummaryrefslogtreecommitdiff
path: root/src/php/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/install.sh')
-rw-r--r--src/php/install.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/php/install.sh b/src/php/install.sh
index 6956292..847f50f 100644
--- a/src/php/install.sh
+++ b/src/php/install.sh
@@ -40,7 +40,7 @@ if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
fi
done
if [ "${USERNAME}" = "" ]; then
- USERNAME=vscode
+ USERNAME=root
fi
elif [ "${USERNAME}" = "none" ]; then
USERNAME=root
@@ -122,6 +122,11 @@ if [ -d "${PHP_INSTALL_DIR}" ]; then
exit 1
fi
+if ! cat /etc/group | grep -e "^php:" > /dev/null 2>&1; then
+ groupadd -r php
+fi
+usermod -a -G php "${USERNAME}"
+
PHP_URL="https://www.php.net/distributions/php-${VERSION}.tar.gz"
PHP_INI_DIR="${PHP_INSTALL_DIR}/ini"
@@ -192,4 +197,8 @@ rm -rf ${PHP_SRC_DIR}
updaterc "if [[ \"\${PATH}\" != *\"${CURRENT_DIR}\"* ]]; then export PATH=${CURRENT_DIR}/bin:\${PATH}; fi"
+chown -R :php "${PHP_DIR}"
+chmod -R g+r+w "${PHP_DIR}"
+find "${PHP_DIR}" -type d | xargs -n 1 chmod g+s
+
echo "Done!"