Skip to content
Snippets Groups Projects
Commit 432f6b9f authored by Dillenn Terumalai's avatar Dillenn Terumalai :speech_balloon:
Browse files

Merge branch 'dev' into 'master'

Dev

See merge request SPSP/transfer-tool!14
parents 15dd1f49 fd0bbba1
Branches
Tags v1.12.0
1 merge request!14Dev
Pipeline #3987 passed
......@@ -2,7 +2,7 @@
# SPSP transfer-tool is developed and maintained by SIB. For more information, please contact spsp-support@sib.swiss
VERSION="1.11.0" # bumped to support spsp --help, spsp --version
VERSION="1.12.0" # bumped to support spsp --help, spsp --version
# Define colors that are used in the help screen
......@@ -841,6 +841,21 @@ if [ $# -gt 0 ]; then
echo " - Ignoring .env file..."
else
if [ -f .env ]; then
if [ "$MACHINE" == "linux" ]; then
if [ "$(stat -c "%a" .env)" != "600" ]; then
printf "${BACK_RED} ERROR ${COL_RESET} ${COL_RED}Stopped with 1 error${COL_RESET} ${COL_GREY} ${TIME} ${COL_RESET}\n"
printf "${BACK_RED} error ${COL_RESET} permissions incorrect: the configuration file should be configured with 600 permissions (chmod 600 .env).\n"
printf "${BACK_CYAN} INFO ${COL_RESET} More info at ${COL_CYAN} https://gitlab.sib.swiss/SPSP/transfer-tool/-/wikis/Installation#configure-the-env-file ${COL_RESET}"
exit 22
fi
elif [ "$MACHINE" == "mac" ]; then
if [ "$(stat -f "%Lp" .env)" != "600" ]; then
printf "${BACK_RED} ERROR ${COL_RESET} ${COL_RED}Stopped with 1 error${COL_RESET} ${COL_GREY} ${TIME} ${COL_RESET}\n"
printf "${BACK_RED} error ${COL_RESET} permissions incorrect: the configuration file should be configured with 600 permissions (chmod 600 .env).\n"
printf "${BACK_CYAN} INFO ${COL_RESET} More info at ${COL_CYAN} https://gitlab.sib.swiss/SPSP/transfer-tool/-/wikis/Installation#configure-the-env-file ${COL_RESET}"
exit 22
fi
fi
source .env
else
echo " - Creating a new .env file..."
......@@ -852,6 +867,7 @@ if [ $# -gt 0 ]; then
echo "ID=$identifier" >.env
echo 'HOST=spsp.sib.swiss' >>.env
echo 'SFTP_URL=${ID}@${HOST}:data' >>.env
chmod 600 .env
answer=true
else
echo ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment