#!/bin/sh _term() { kill -TERM "$server_pid" 2>/dev/null } trap _term SIGTERM /usr/bin/zmp24 & server_pid=$! wait "$server_pid"