Subversion Repositories PEEPS

Rev

Blame | Last modification | View Log | RSS feed

#!/bin/bash

#Define cleanup procedure
cleanup() {
    echo "Container stopped, performing cleanup..."
    /etc/init.d/apache2 stop
}

#Trap SIGTERM
trap 'cleanup' SIGTERM

#Execute a command
"${@}" &

#Wait
wait $!