From 93c9f8a721f215615f8d9e443fd68212ae8966ce Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 20 Jan 2022 11:23:42 +0100 Subject: [PATCH] install.sh: only copy config.example.json if $INSTALL_DIR/config.json does not exist. --- install.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 11ca433..54d8f04 100755 --- a/install.sh +++ b/install.sh @@ -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"