Browse Source

Start script now works for all relative paths ensuring runtipi is the current working directory.

dextreem 2 years ago
parent
commit
eb08dd4021
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/start.sh

+ 1 - 1
scripts/start.sh

@@ -75,7 +75,7 @@ while [ -n "$1" ]; do # while loop starts
 done
 done
 
 
 # Ensure BASH_SOURCE is ./scripts/start.sh
 # Ensure BASH_SOURCE is ./scripts/start.sh
-if [[ "${BASH_SOURCE[0]}" != "./scripts/start.sh" ]]; then
+if [[ $(basename $(pwd)) != "runtipi" ]] || [[ ! -f "${BASH_SOURCE[0]}" ]]; then
   echo "Please make sure this script is executed from runtipi/"
   echo "Please make sure this script is executed from runtipi/"
   exit 1
   exit 1
 fi
 fi