Browse Source

* Autodetectar ejecutables

guzman 2 years ago
parent
commit
25a94e1830
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cryfs-automount

+ 2 - 2
cryfs-automount

@@ -175,14 +175,14 @@ fi
 name=$1
 
 #Check if cryfs is installed
-if [ ! -x /usr/local/bin/cryfs ]; then
+if [ ! -x "$(which cryfs)" ]; then
 	echo "ERROR: CryFS is not installed."
 	echo "https://www.cryfs.org/#download"
 	exit 1
 fi
 
 #Check if cryfs-automount is installed
-if [ ! -x /usr/local/bin/$(basename "$0") ]; then
+if [ ! -x "$(which $(basename "$0"))" ]; then
 	echo "WARNING: "$(basename "$0")" is not installed."
 	echo "We'll use root access only for installation."
 	test=$(sudo whoami)