#!/bin/bash # Start the first process ./celery & # Start the second process ./daphne & # Wait for any process to exit wait -n # Exit with status of process that exited first exit $?