1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-16 04:24:56 +02:00

install.sh: only copy config.example.json if $INSTALL_DIR/config.json does not exist.

This commit is contained in:
Henrik Hautakoski 2022-01-20 11:23:42 +01:00
parent bfaaacc3ad
commit 93c9f8a721
No known key found for this signature in database
GPG key ID: 608414D93E862CCD

View file

@ -9,16 +9,13 @@ INSTALL_DIR=$1
echo "Installing application in: $INSTALL_DIR"
if [ -f "config.json" ];then
CONFIG_FILE=./config.json
else :
CONFIG_FILE=config.example.json
fi
mkdir -p "$INSTALL_DIR"/{bin,logs}
install -m 750 -t "${INSTALL_DIR}/bin" build/eosio-ship-trace-reader
install -T -m 600 ${CONFIG_FILE} "${INSTALL_DIR}/config.json"
if [ ! -f "${INSTALL_DIR}/config.json" ]; then
install -T -m 600 config.example.json "${INSTALL_DIR}/config.json"
fi
install -m 750 -t "${INSTALL_DIR}" scripts/start.sh scripts/stop.sh
echo "Done"