2022-07-20 09:03:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
if [ $(id -u) -ne 0 ] ; then
|
|
|
|
|
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
|
|
|
|
|
curl https://releases.mattermost.com/7.2.0/mattermost-7.2.0-linux-amd64.tar.gz -Lo /tmp/mattermost.tar.gz
|
2022-08-17 13:12:35 +00:00
|
|
|
tar -xzf /tmp/mattermost.tar.gz -C /tmp
|
2022-08-17 12:01:18 +00:00
|
|
|
cd /tmp/drupal-*
|
|
|
|
|
cp -r * /opt/bunkerweb/www
|
|
|
|
|
chown -R $user:nginx /opt/bunkerweb/www
|
|
|
|
|
find /opt/bunkerweb/www -type f -exec chmod 0640 {} \;
|
|
|
|
|
find /opt/bunkerweb/www -type d -exec chmod 0750 {} \;
|
2022-08-17 13:12:35 +00:00
|
|
|
cp -r bw-data/configs/* /opt/bunkerweb/configs
|