Skip to content

Commit

Permalink
Linux installer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanbossenger committed Oct 15, 2022
1 parent a558087 commit ffd12c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions linux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ sed -i s/"HOME_USER=wp-local-env"/"HOME_USER=$USER"/g sitedrop.sh
# replace VM_IP with $INSTANCE_IP
sed -i s/"VM_IP=192.168.64.2"/"VM_IP=$INSTANCE_IP"/g sitesetup.sh
sed -i s/"VM_IP=192.168.64.2"/"VM_IP=$INSTANCE_IP"/g sitedrop.sh
# replace wp-local-env with $USER
sed -i s/"runuser -l wp-local-env"/"runuser -l $USER"/g sitesetup.sh

# install scripts
sudo mv sitesetup.sh /usr/local/bin/sitesetup
sudo mv sitedrop.sh /usr/local/bin/sitedrop
Expand Down
2 changes: 1 addition & 1 deletion linux/scripts/multipass/sitesetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SSL_VIRTUAL_HOST="<IfModule mod_ssl.c>
</VirtualHost>
</IfModule>"

if [ $PHP_VERSION == '7.4' ]; then
if [ "$PHP_VERSION" == '7.4' ]; then
SSL_VIRTUAL_HOST="<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerName $SITE_NAME.test
Expand Down
6 changes: 3 additions & 3 deletions linux/scripts/os/sitesetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ HOME_USER=wp-local-env
VM_IP=192.168.64.2

SSL_CERTS_DIRECTORY=/home/$HOME_USER/wp-local-env/ssl-certs
SITES_DIRECTORY=/home/$HOME_USERwp-local-env/sites
SITES_DIRECTORY=/home/$HOME_USER/wp-local-env/sites

echo "Creating certs.."

cd $SSL_CERTS_DIRECTORY
mkcert "$SITE_NAME".test
MKCERT_EXECUTABLE=/home/linuxbrew/.linuxbrew/bin/mkcert
runuser -l wp-local-env -c "cd $SSL_CERTS_DIRECTORY && $MKCERT_EXECUTABLE $SITE_NAME.test"

echo "Setting up hosts record..."

Expand Down

0 comments on commit ffd12c0

Please sign in to comment.