Skip to content
Snippets Groups Projects
Commit 13e42d0b authored by Andrea Michelotti's avatar Andrea Michelotti
Browse files

few test more in installation

parent 27bb6157
No related branches found
No related tags found
No related merge requests found
......@@ -456,12 +456,23 @@ md5=`md5sum $TMPDIR/$name.tgz | cut -d ' ' -f 1`
extract(){
host=$1
info_mesg "extracting in " "$host"
if ssh $DEPLOY_USER@$host "test -f $DEPLOY_PREFIX_DIR/$name.tgz"; then
ver="installed "`date`" MD5:$md5"
if ssh $DEPLOY_USER@$host "cd $DEPLOY_PREFIX_DIR;tar xfz $name.tgz;ln -sf $name $dest_prefix;echo \"$ver\" > README.install;rm $name.tgz"; then
if ssh $DEPLOY_USER@$host "cd $DEPLOY_PREFIX_DIR;tar xfz $name.tgz"; then
ok_mesg "extracting $name in $host"
if ssh $DEPLOY_USER@$host "cd $DEPLOY_PREFIX_DIR;ln -sf $name $dest_prefix;echo \"$ver\" > README.install;rm $name.tgz"; then
ok_mesg "setup&cleanup $name in $host "
else
nok_mesg "setup&cleanup $name in $host "
fi
else
nok_mesg "extracting $name in $host"
fi
else
echo "## $DEPLOY_PREFIX_DIR/$name.tgz not present"
fi
}
......
......@@ -52,9 +52,9 @@ base_source=`basename $source`
echo "* md5: $md5"
for s in $list;do
if [ -n "$dest" ];then
rmd5=`ssh $user@$s "md5sum $dest/$base_source|cut -d ' ' -f 1"`
rmd5=`ssh $user@$s "if [ -e $dest/$base_source ]; then md5sum $dest/$base_source|cut -d ' ' -f 1; fi"`
else
rmd5=`ssh $user@$s "md5sum $base_source|cut -d ' ' -f 1"`
rmd5=`ssh $user@$s "if [ -e $dest/$base_source ]; then md5sum $base_source|cut -d ' ' -f 1;fi"`
fi
if ! [ "$rmd5" == "$md5" ];then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment