mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-05-30 19:52:24 -04:00
Update default path for traccar.xml in run.sh
script
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user