Skip to content

Commit

Permalink
πŸš‘ Set Mutex value in Apache config to prevent auto reload issues on boot
Browse files Browse the repository at this point in the history
resolves #868
  • Loading branch information
svpernova09 committed May 26, 2018
1 parent 860e3cd commit 2af11c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/serve-apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ sudo a2enmod ssl
# Turn on headers support
sudo a2enmod headers

# Add Mutex to config to prevent auto restart issues
echo 'Mutex posixsem' | sudo tee -a /etc/apache2/apache2.conf

service apache2 restart

if [ $? == 0 ]
Expand Down

1 comment on commit 2af11c2

@jtwee
Copy link
Contributor

@jtwee jtwee commented on 2af11c2 May 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just applied this change and whilst it does fix the bug that initially flagged it, I've noticed that the echo fix appends that line to /etc/apache2/apache2.conf for each site registered on each provision. Not a huge problem, but perhaps we should grep for its presence first?

# Add Mutex to config to prevent auto restart issues
if [ -z "$(grep '^Mutex posixsem$' /etc/apache2/apache2.conf)" ]
then
    echo 'Mutex posixsem' | sudo tee -a /etc/apache2/apache2.conf
fi

Edit: added a pull request #869

Please sign in to comment.