bunkerweb/examples/joomla/setup-linux.sh

21 lines
540 B
Bash
Raw Normal View History

2022-07-21 09:39:35 +00:00
#!/bin/bash
2023-10-02 10:05:15 +00:00
if [ "$(id -u)" -ne 0 ] ; then
2022-07-21 09:39:35 +00:00
echo "❌ Run me as root"
exit 1
fi
2022-08-17 12:01:18 +00:00
if id www-data > /dev/null 2>&1 ; then
user="www-data"
elif id apache > /dev/null 2>&1 ; then
user="apache"
else
echo "❌ No PHP user found"
exit 1
fi
2024-06-26 16:25:43 +00:00
curl https://downloads.joomla.org/fr/cms/joomla5/5-1-1/Joomla_5-1-1-Stable-Full_Package.zip?format=zip -Lo /tmp/joomla.zip
2022-11-11 13:55:04 +00:00
unzip -qq /tmp/joomla.zip -d /var/www/html
chown -R $user:nginx /var/www/html
find /var/www/html -type f -exec chmod 0640 {} \;
find /var/www/html -type d -exec chmod 0750 {} \;