#!/bin/bash if [ -z "$PHPVER" ]; then PHPVER="81"; fi adduser -u $uid $user mkdir -p /home/$user/public_html chown -R $user:$user /home/$user chmod -R 755 /home/$user /scripts/install-php$PHPVER.sh /scripts/create-vhost.sh /scripts/create-php-config.sh /usr/sbin/httpd -k start /usr/sbin/php-fpm -y /etc/php-fpm.conf if [[ $environment == 'DEV' ]]; then echo "Starting Dev Deployment" dnf install -y MariaDB-server MariaDB-client memcached nohup mysqld -umysql & if [ ! -f /var/lib/mysql/creds ]; then echo "Give MySQL a chance to finish starting..." sleep 10 mysql_user=$(tr -dc A-Za-z0-9 /var/lib/mysql/creds echo "MySQL Password: "$mysql_password >> /var/lib/mysql/creds echo "MySQL Database: devdb_"$mysql_db >> /var/lib/mysql/creds cat /var/lib/mysql/creds fi /usr/bin/memcached -d -u $user fi tail -f /etc/httpd/logs/* exit 0