Skip to content

Instantly share code, notes, and snippets.

@thebwt
Last active December 7, 2015 16:01
Show Gist options
  • Save thebwt/d6ac95ff0402074c5669 to your computer and use it in GitHub Desktop.
Save thebwt/d6ac95ff0402074c5669 to your computer and use it in GitHub Desktop.
Trying to make use envvars
root@3ede659389e3:/var/www/html# which apache2-foreground
/usr/local/bin/apache2-foreground
root@3ede659389e3:/var/www/html# cat /usr/local/bin/apache2-foreground
#!/bin/bash
set -e
APACHE_CONFDIR=/etc/apache2
APACHE_ENVVARS=$APACHE_CONFDIR/envvars
export APACHE_CONFDIR APACHE_ENVVARS
# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2.pid
exec apache2 -DFOREGROUND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment