Check if --data-dir exists

This commit is contained in:
Girish Ramakrishnan
2017-04-07 11:37:30 -07:00
parent b422a27be8
commit 299e8aceeb
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -126,6 +126,11 @@ if [[ -z "${dataJson}" ]]; then
echo "--dns-provider must be one of : manual, noop"
exit 1
fi
if [[ -n "${baseDataDir}" && ! -d "${baseDataDir}" ]]; then
echo "${baseDataDir} does not exist"
exit 1
fi
fi
echo ""
+1 -1
View File
@@ -60,7 +60,7 @@ if [[ "${is_update}" == "yes" ]]; then
fi
# setup links to data directory
if [[ "${arg_data_dir}" != "" ]]; then
if [[ -n "${arg_data_dir}" ]]; then
echo "==> installer: setting up links to data directory"
mkdir "${arg_data_dir}/appsdata"
ln -s "${arg_data_dir}/appsdata" "${BASE_DATA_DIR}/appsdata"