Browse Source

Added SSHPASS for password less ssh

bugfixes
gau1991 10 years ago
parent
commit
1a05e88659
  1. 4
      bin/install
  2. 4
      src/modules/site/migrate/ee_mod_migrate_data.sh

4
bin/install

@ -105,9 +105,9 @@ elif [ "$EE_LINUX_DISTRO" == "Debian" ]; then
ee_lib_package_check graphviz python-software-properties
fi
if [ ! -x /usr/bin/tee ] || [ ! -x /bin/ed ] || [ ! -x /usr/bin/bc ] || [ ! -x /usr/bin/wget ] || [ ! -x /usr/bin/curl ] || [ ! -x /bin/tar ] || [ ! -x /usr/bin/git ] || [ ! -x /usr/bin/pv ] || [ ! -x /usr/bin/lftp ] || [ -n "$EE_PACKAGE_NAME" ]; then
if [ ! -x /usr/bin/tee ] || [ ! -x /bin/ed ] || [ ! -x /usr/bin/bc ] || [ ! -x /usr/bin/wget ] || [ ! -x /usr/bin/curl ] || [ ! -x /bin/tar ] || [ ! -x /usr/bin/git ] || [ ! -x /usr/bin/pv ] || [ ! -x /usr/bin/lftp ] || [ ! -x /usr/bin/sshpass ] || [ -n "$EE_PACKAGE_NAME" ]; then
ee_lib_echo "Installing required packages, please wait..." | tee -ai $EE_INSTALL_LOG
apt-get -y install coreutils ed bc wget curl tar git-core lftp pv $EE_PACKAGE_NAME | tee -ai $EE_INSTALL_LOG\
apt-get -y install coreutils ed bc wget curl tar git-core lftp pv sshpass $EE_PACKAGE_NAME | tee -ai $EE_INSTALL_LOG\
|| ee_lib_error "Unable to install required packages, exit status = " $?
fi

4
src/modules/site/migrate/ee_mod_migrate_data.sh

@ -9,10 +9,10 @@ function ee_mod_migrate_data()
# Copy webroot using ssh with the help of rsync
if [ "$EE_REMOTE_METHOD" == "ssh" ]; then
# Lets FTP or rsync files
rsync -avz --progress $EE_REMOTE_USER@$EE_REMOTE_SERVER:$EE_REMOTE_PATH/ /ee-backup/$EE_DOMAIN/ \
rsync -avz --progress --rsh='sshpass -p$EE_REMOTE_PASSWORD ssh -l $EE_REMOTE_USER' $EE_REMOTE_SERVER:$EE_REMOTE_PATH/ /ee-backup/$EE_DOMAIN/ \
|| ee_lib_error "Unable to migrate data using rsync, exit status = " $?
if [ ! -f /ee-backup/$EE_DOMAIN/wp-config.php ] && [ "$EE_SITE_CREATE_OPTION" != "--html" ] && [ "$EE_SITE_CREATE_OPTION" != "--php" ] && [ "$EE_SITE_CREATE_OPTION" != "--mysql" ]; then
rsync -avz --progress $EE_REMOTE_USER@$EE_REMOTE_SERVER:$EE_REMOTE_PATH/../wp-config.php /ee-backup/$EE_DOMAIN/ \
rsync -avz --progress --rsh='sshpass -p$EE_REMOTE_PASSWORD ssh -l $EE_REMOTE_USER' $EE_REMOTE_SERVER:$EE_REMOTE_PATH/../wp-config.php /ee-backup/$EE_DOMAIN/ \
|| ee_lib_error "Unable to migrate data using rsync, exit status = " $?
fi

Loading…
Cancel
Save