From 89d82860213b2f6c4209b5c41386dd7906f83b74 Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 9 Sep 2020 10:32:18 +0100 Subject: [PATCH] move old scripts location --- .../old/server-install-litespeed.sh | 41 ---------- .../old/server-install-nginx.sh | 17 ----- dev-production-universal/old/wp-duplicate.sh | 75 ------------------- dev-production-universal/old/wp-export.sh | 23 ------ .../local => install/config/remote}/php | 2 +- 5 files changed, 1 insertion(+), 157 deletions(-) delete mode 100755 dev-production-universal/old/server-install-litespeed.sh delete mode 100755 dev-production-universal/old/server-install-nginx.sh delete mode 100755 dev-production-universal/old/wp-duplicate.sh delete mode 100755 dev-production-universal/old/wp-export.sh rename {dev-production-universal/config/local => install/config/remote}/php (63%) diff --git a/dev-production-universal/old/server-install-litespeed.sh b/dev-production-universal/old/server-install-litespeed.sh deleted file mode 100755 index 5bd88ea..0000000 --- a/dev-production-universal/old/server-install-litespeed.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ] ; then - echo "error: must specify configuration file to use" - exit 5 -fi - -. ./"$1" - -# check we have ssh access -[ -z "$ssh_root" ] && echo "Error: no root ssh configuration specified" && exit 5 - -ssh -T $ssh_root << EOSSH - -ufw allow http && ufw allow https - -if [ "$litespeed_version" != 'latest' ] ; then - echo "TODO install specific litespeed version" - echo "" - echo "Specify \"litespeed_version='latest'\" to install current version." - exit 1 -fi -if [ -n "$wp_user" ] ; then - wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ols1clk.sh \ - --adminpassword "$ls_webadmin_pass" \ - --lsphp "$ls_lsphp_version" \ - --wordpressplus "$url" \ - --wordpresspath "$wp_path" \ - --dbrootpassword "$db_root_pass" \ - --dbpassword "$db_pass" \ - --dbname "$db_name" \ - --dbuser "$db_user" \ - --wpuser "$wp_user" \ - --wppassword "$wp_pass" \ - && ufw allow 7080 - else - echo "TODO install litespeed without WordPress" - exit 1 -fi - -EOSSH diff --git a/dev-production-universal/old/server-install-nginx.sh b/dev-production-universal/old/server-install-nginx.sh deleted file mode 100755 index d67a78b..0000000 --- a/dev-production-universal/old/server-install-nginx.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ] ; then - echo "error: must specify configuration file to use" - exit 5 -fi - -. ./"$1" - -ssh -T $src_ssh << EOSSH - -ufw allow http && ufw allow https - -echo "TODO install nginx" -exit 1 - -EOSSH diff --git a/dev-production-universal/old/wp-duplicate.sh b/dev-production-universal/old/wp-duplicate.sh deleted file mode 100755 index dc74d41..0000000 --- a/dev-production-universal/old/wp-duplicate.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -. ./config - -if [ "$1" = 'local' ] ; then - src_url="$local_url"; - dest_url="$remote_url"; - src_ssh="$local_ssh" - dest_ssh="$remote_ssh" -elif [ "$1" = 'remote' ] ; then - src_url="$remote_url"; - dest_url="$local_url"; - src_ssh="$remote_ssh" - dest_ssh="$local_ssh" -else - echo "error: must specify local or remote" - exit 5 -fi - -db_file="$wp_path/data.sql" -tar_file="/tmp/wordpress.tar.gz" - -############## source - -ssh -T $src_ssh << EOSSH -wp db export \ - --path="$wp_path" \ - --dbuser="$wp_db_user" \ - --dbpass="$wp_db_pass" \ - --add-drop-table \ - --allow-root \ - "$db_file" -tar czf "$tar_file" "$wp_path" -EOSSH - -scp "$src_ssh:$tar_file" "$tar_file" - -ssh -T $src_ssh << EOSSH -rm "$db_file" -rm "$tar_file" -EOSSH - -############## destination - -scp "$tar_file" "$dest_ssh:$tar_file" - -ssh -T $dest_ssh << EOSSH -rm -Rf "$wp_path" -cd / -tar xzf "$tar_file" - -wp db import \ - --path="$wp_path" \ - --dbuser="$wp_db_user" \ - --dbpass="$wp_db_pass" \ - --allow-root \ - "$db_file" -rm "$db_file" -rm "$tar_file" -wp search-replace \ - --path="$wp_path" \ - --allow-root \ - --skip-columns=guid \ - "$src_url" \ - "$dest_url" -wp option update home \ - --path="$wp_path" \ - --allow-root -wp option update home \ - --path="$wp_path" \ - --allow-root -EOSSH - - -mv "$tar_file" ./wordpress-"$(date +%s)".tar.gz diff --git a/dev-production-universal/old/wp-export.sh b/dev-production-universal/old/wp-export.sh deleted file mode 100755 index 3aa017a..0000000 --- a/dev-production-universal/old/wp-export.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -. ./config-urls - -( - echo "export local_url=\"$local_ur\""; \ - echo "export remote_url=\"$remote_url\""; \ - cat config "$2" \ -) | ssh root@"$local_url" -T /bin/sh - -( - echo "export local_url=\"$remote_url\""; \ - echo "export remote_url=\"$local_url\""; \ - cat config "$2" \ -) | ssh root@"$remote_url" -T /bin/sh - -db_file="$wp_path/data.sql" - -wp db export --dbuser=wordpress --dbpass=$db_pass --add-drop-table --alow-root "$db_file" -tar czf /tmp/wordpress.tar.gz "$wp_path" -# scp -rm "$db_file" -rm /tmp/wordpress.tar.gz diff --git a/dev-production-universal/config/local/php b/install/config/remote/php similarity index 63% rename from dev-production-universal/config/local/php rename to install/config/remote/php index eb51759..1151bc3 100644 --- a/dev-production-universal/config/local/php +++ b/install/config/remote/php @@ -1,5 +1,5 @@ ## php configuration # ## uncomment if using php -php_version='latest' +#export php_version='latest'