Skip to content

Instantly share code, notes, and snippets.

@jbfink
Last active December 19, 2015 12:09
Show Gist options
  • Save jbfink/5952630 to your computer and use it in GitHub Desktop.
Save jbfink/5952630 to your computer and use it in GitHub Desktop.
apache foreground.sh for use with supervisord
#!/bin/bash
read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat
trap "kill -TERM -$pgrp; exit" EXIT TERM KILL SIGKILL SIGTERM SIGQUIT
source /etc/apache2/envvars
apache2 -D FOREGROUND
[program:mysqld]
command=/usr/sbin/mysqld
[program:httpd]
command=/etc/apache2/foreground.sh
stopsignal=6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment