From b2e95eb294872828032519088d1e5c1412a55409 Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 9 Sep 2020 11:54:46 +0100 Subject: [PATCH] put configuration into separate file --- tools/wp-content-db/config | 8 ++++++++ tools/wp-content-db/export-wp-content-db.sh | 9 +-------- tools/wp-content-db/import-wp-content-db.sh | 9 +-------- 3 files changed, 10 insertions(+), 16 deletions(-) create mode 100644 tools/wp-content-db/config diff --git a/tools/wp-content-db/config b/tools/wp-content-db/config new file mode 100644 index 0000000..7b89e91 --- /dev/null +++ b/tools/wp-content-db/config @@ -0,0 +1,8 @@ +remote_protocol='https' +remote_domain='remote.cloudwaysapps.com' +remote_ssh='user@remote.cloudwaysapps.com' +remote_wp_path='/home/remote.cloudwaysapps.com/aabbccddee/public_html' + +local_protocol='http' +local_domain='local.local' +local_wp_path='/var/www/html/wordpress' diff --git a/tools/wp-content-db/export-wp-content-db.sh b/tools/wp-content-db/export-wp-content-db.sh index e196b70..3c776f1 100755 --- a/tools/wp-content-db/export-wp-content-db.sh +++ b/tools/wp-content-db/export-wp-content-db.sh @@ -1,13 +1,6 @@ #!/bin/sh -remote_protocol='https' -remote_domain='wordpress-453075-1468300.cloudwaysapps.com' -remote_ssh='test123@wordpress-453075-1468300.cloudwaysapps.com' -remote_wp_path='/home/453075.cloudwaysapps.com/mhhusspndh/public_html' - -local_protocol='http' -local_domain='thecampsitebible.home' -local_wp_path='/var/www/html/wordpress' +. ./config rsync -azP "$local_wp_path/wp-content/" "$remote_ssh:$remote_wp_path/wp-content" --delete-before diff --git a/tools/wp-content-db/import-wp-content-db.sh b/tools/wp-content-db/import-wp-content-db.sh index ad8e42d..fd590ab 100755 --- a/tools/wp-content-db/import-wp-content-db.sh +++ b/tools/wp-content-db/import-wp-content-db.sh @@ -1,13 +1,6 @@ #!/bin/sh -remote_protocol='https' -remote_domain='wordpress-453075-1468300.cloudwaysapps.com' -remote_ssh='test123@wordpress-453075-1468300.cloudwaysapps.com' -remote_wp_path='/home/453075.cloudwaysapps.com/mhhusspndh/public_html' - -local_protocol='http' -local_domain='thecampsitebible.home' -local_wp_path='/var/www/html/wordpress' +. ./config rsync -azP "$remote_ssh:$remote_wp_path/wp-content/" "$local_wp_path/wp-content" --delete-before