Files
weave-scope/docker/entrypoint.sh
Alfonso Acosta 5433c256c7 Fix argument escaping in Scope
By naively using echo and cat to print to serialize/deserealize arguments we were garbling
arguments with special characters and whitespaces
2016-10-25 15:35:48 +00:00

22 lines
433 B
Bash
Executable File

#!/bin/bash
mkdir -p /var/run/weave
for arg in $@; do
case "$arg" in
--no-app|--probe-only|--service-token*|--probe.token*)
touch /etc/service/app/down
;;
--no-probe|--app-only)
touch /etc/service/probe/down
;;
esac
done
ARGS=("$@")
typeset -p ARGS >/var/run/weave/scope-app.args
typeset -p ARGS >/var/run/weave/scope-probe.args
exec /home/weave/runsvinit