vls-container/vlsd/entrypoint.sh
Lakshya Singh 4abc404246
vls: docker image, asssets and entrypoint
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2023-11-05 16:55:51 +05:30

21 lines
399 B
Bash
Executable File

#!/bin/sh
set -e
cp /vlsd2.toml $VLS_DATA/
sed -i "1s/^/network = \"$VLS_NETWORK\"\n/" $VLS_DATA/vlsd2.toml
if [ $(echo "$1" | cut -c1) = "-" ]; then
echo "$0: assuming arguments for vlsd2"
set -- vlsd2 "$@"
fi
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "vlsd2" ]; then
echo "$0: setting config to $VLS_DATA/vlsd2.toml"
set -- "$@" --config=$VLS_DATA/vlsd2.toml
fi
echo
exec "$@"