absolute path

This commit is contained in:
root
2023-05-24 13:50:56 +00:00
parent 467099549f
commit c50906e08e

View File

@@ -75,11 +75,17 @@ ask_envs() {
DISCOVERY="no";
else
DISCOVERY="yes";
echo "Directory of service discovery scripts: (/usr/local/bin/)";
echo "Path of service discovery scripts: (/usr/local/bin/)";
read -r DISCOVERY_DIR;
if [ "$DISCOVERY_DIR" == "" ] ; then
DISCOVERY_DIR="/usr/local/bin/"
# TODO - abszolut
else
# while not an absolute path
while [ ${DISCOVERY_DIR:0:1} != "/" ]; do
echo "The path must be absolute, for example /usr/local/bin/. Please type it again."
read -r DISCOVERY_DIR;
done
fi
echo "Path of the discovery config file: (discovery.conf)";