lovespeech/websocket-server/entrypoint.sh

22 lines
397 B
Bash
Executable file

#!/bin/sh
set -x
safeexec() {
CMD="$1"
shift
test -x "$CMD" && exec "$CMD" "$@"
}
test "" = "$*" || { exec "$@"; }
safeexec /mnt/entrypoint.py || safeexec /entrypoint.py
#
#trap "true" USR2
#while true
#do
# echo "running /entrypoint.py"
# ( /mnt/entrypoint.py || /entrypoint.py ) &
# THEPID=$!
# wait
# test "$?" -gt 128 && {
# kill "$THEPID"
# } || break
#done