Update default path for traccar.xml in run.sh

script
This commit is contained in:
Christopher
2023-11-15 12:25:34 -06:00
parent 7f88120053
commit 01015f5a97

View File

@@ -20,12 +20,12 @@ fi
echo "Using Docker tag: $docker_tag"
# Ask the user where to save the configuration on the host.
echo "Where would you like to save the traccar.xml on the host? (Default: /DATA/AppData/traccar/traccar.xml)"
echo "Where would you like to save the traccar.xml on the host? (Default: /DATA/AppData/big-bear-traccar/traccar.xml)"
read host_path
# If no path is provided, default to /DATA/AppData/traccar/traccar.xml.
# If no path is provided, default to /DATA/AppData/big-bear-traccar/traccar.xml.
if [ -z "$host_path" ]; then
host_path="/DATA/AppData/traccar/traccar.xml"
host_path="/DATA/AppData/big-bear-traccar/traccar.xml"
fi
# Extract the directory part from the provided path
@@ -34,7 +34,8 @@ host_dir=$(dirname "$host_path")
# Create the directory if it does not exist
mkdir -p "$host_dir"
# Check if the specified path is a directory.
# If the directory exists, ask the user if they want to remove it.
# Otherwise, exit without removing the directory.
if [ -d "$host_path" ]; then
echo "Error: $host_path is a directory."
echo "Do you want to remove this directory? (yes/no)"