Skip to content

Commit

Permalink
Ensure php.conf exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Apr 17, 2024
1 parent bdee686 commit 47e235c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2.4.1: 2024-04-17

* Ensure php.conf exists

### 2.4.0: 2024-04-16

* Add self-updater
Expand Down
2 changes: 1 addition & 1 deletion bin/macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Script specific vars
SCRIPT_LABEL='for macOS'
SCRIPT_VERSION='1.1.4 (2024-04-16)'
SCRIPT_VERSION='1.1.5 (2024-04-17)'

# Vars needed for this file to function globally
CURRENTFILE=`basename $0`
Expand Down
12 changes: 12 additions & 0 deletions bin/tasks/vhosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,16 @@ server {
sudo mv ~/$PROJECTNAME.test /etc/nginx/sites-available/$PROJECTNAME.test
sudo ln -s /etc/nginx/sites-available/$PROJECTNAME.test /etc/nginx/sites-enabled/$PROJECTNAME.test

# Ensure php.conf is actually there
if [ ! -f /etc/nginx/php.conf ]; then
# Check if php7.conf found, if yes, then symlink it
if [ -f /etc/nginx/php7.conf ]; then
sudo ln -s /etc/nginx/php7.conf /etc/nginx/php.conf
else
echo "${BOLDRED}php.conf or php7.conf not found in /etc/nginx/${TXTRESET}"
echo "${BOLDRED}Please refer to https://github.com/digitoimistodude/macos-lemp-setup for instructions.${TXTRESET}"
exit 1
fi
fi

echo "${BOLDGREEN}Added vhost, $PROJECTNAME.test added to /etc/nginx/sites-enabled/${TXTRESET}"

0 comments on commit 47e235c

Please sign in to comment.