Created
April 23, 2019 19:46
-
-
Save beatak/60f42ac581197d0096e1ab85a02788a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [ -z "$SERVER_URL" ]; then | |
echo >&2 'SERVER_URL not set' | |
exit 1 | |
fi | |
if [ -z "$LOCATION" ]; then | |
echo >&2 'LOCATION not set' | |
exit 1 | |
fi | |
if [ -z "$EXTRA_ARGS" ]; then | |
EXTRA_ARGS="" | |
fi | |
if [ -n "$NAME" ]; then | |
EXTRA_ARGS="$EXTRA_ARGS --name $NAME" | |
fi | |
if [ -n "$KEY" ]; then | |
EXTRA_ARGS="$EXTRA_ARGS --key $KEY" | |
fi | |
if [ -n "$SHAPER" ]; then | |
EXTRA_ARGS="$EXTRA_ARGS --shaper $SHAPER" | |
fi | |
# exec replaces the shell process by the python process and is required to | |
# propagate signals (i.e. SIGTERM) | |
exec python /wptagent/wptagent.py --server "${SERVER_URL}" --location "${LOCATION}" ${EXTRA_ARGS} --xvfb --dockerized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment