feature #4139: create .monitor file in ssh_make_path

This commit is contained in:
Javi Fontan committed 2016-04-28 10:42:08 +02:00
1 parent 3cb5cab021
commit de891f3fb0
1 file changed
+7 -1
+7 -1
View File
@@ -433,12 +433,18 @@ EOF
echo "$SSH_EXEC_OUT"
}
#Creates path ($2) at $1
# Creates path ($2) at $1. If third parameter is "monitor" creates the
# file ".monitor" in the directory. Used for ssh disk monitoring
function ssh_make_path
{
SSH_EXEC_ERR=`$SSH $1 sh -s 2>&1 1>/dev/null <<EOF
set -e
if [ ! -d $2 ]; then
mkdir -p $2
if [ "monitor" = "$3" ]; then
touch "$2/.monitor"
fi
fi
EOF`
SSH_EXEC_RC=$?