#!/bin/sh

H=$(hostname)
  
echo ${H}

if [ ${H} = 'enebish' ]; then
  
  mysqldump -uroot -proot etsweb > /tmp/etsweb.dump
  
  if [ ${?} = 0 ]; then
    echo Copying database file dump...
    scp /tmp/etsweb.dump hidalgo:/tmp
  fi
    
#  if [ ${?} = 0 ]; then
#    echo Executing remote import
#    ssh hidalgo '/Users/claudioc/Sites/etsweb/sites/all/extra/scripts/loaddb.sh /tmp/etsweb.dump'
#  fi
  
fi

if [ ${H} = 'ububox' ]; then

  mysqldump -uroot -proot etsweb > /tmp/etsweb.dump
  
  if [ ${?} = 0 ]; then
    echo Copying database file dump...
    scp /tmp/etsweb.dump enebish:/tmp
  fi


fi

