diff --git a/config/local/apache b/config/local/apache deleted file mode 100644 index 08b120d..0000000 --- a/config/local/apache +++ /dev/null @@ -1,4 +0,0 @@ -## apache configuration -# -## uncomment if using apache -apache2_version='latest' diff --git a/config/local/database b/config/local/database new file mode 100644 index 0000000..a9bd044 --- /dev/null +++ b/config/local/database @@ -0,0 +1,8 @@ +export mariadb_version='latest' +#mysql_version='latest' + +export db_root_pass='9483ujtej0--=0FFFdl' + +export db_name='wordpress' +export db_user='wordpress' +export db_pass='wordpress' diff --git a/config/local/mariadb b/config/local/mariadb deleted file mode 100644 index 02edee1..0000000 --- a/config/local/mariadb +++ /dev/null @@ -1,4 +0,0 @@ -## uncomment if using mariadb -mariadb_version='latest' -db_root_pass='9483ujtej0--=0FFFdl' - diff --git a/config/local/mysql b/config/local/mysql deleted file mode 100644 index 4b5cf1a..0000000 --- a/config/local/mysql +++ /dev/null @@ -1,3 +0,0 @@ -## uncomment if using mysql -#mysql_version='latest' -#db_root_pass='9483ujtej0--=0FFFdl' diff --git a/config/local/nginx b/config/local/nginx deleted file mode 100644 index 37f2e01..0000000 --- a/config/local/nginx +++ /dev/null @@ -1,5 +0,0 @@ -## nginx configuration - -## uncomment if using nginx -#nginx_version='latest' - diff --git a/config/local/litespeed b/config/local/webserver similarity index 65% rename from config/local/litespeed rename to config/local/webserver index 079ea89..a959479 100644 --- a/config/local/litespeed +++ b/config/local/webserver @@ -1,10 +1,15 @@ -## litespeed configuration -## uncomment if using litespeed +apache2_version='latest' + +#nginx_version='latest' ## specify specific version from latest, 54, 55, 56, 70, 71, 72, 73 or 74 #export litespeed_version='latest' -## php version +###################### +# litespeed specific # +###################### + +## litespeed php version #export ls_lsphp_version='73' ## https://openlitespeed.org/kb/1-click-install/ diff --git a/config/remote/apache b/config/remote/apache deleted file mode 100644 index 1d56db0..0000000 --- a/config/remote/apache +++ /dev/null @@ -1,4 +0,0 @@ -## apache configuration -# -## uncomment if using apache -# apache2_version='latest' diff --git a/config/remote/cloudways b/config/remote/cloudways deleted file mode 100644 index d597903..0000000 --- a/config/remote/cloudways +++ /dev/null @@ -1,11 +0,0 @@ -# cloudways configuration - -. ./config/remote/cloudways.secret - -cloudways_user='cloudways@rayelliott.dev' -cloudways_url='https://wordpress-453075-1468300.cloudwaysapps.com' - -cloudways_ssh='test123@wordpress-453075-1468300.cloudwaysapps.com' - -cloudways_db_name='mhhusspndh' -cloudways_db_user='mhhusspndh' diff --git a/config/remote/database b/config/remote/database new file mode 100644 index 0000000..cc75eae --- /dev/null +++ b/config/remote/database @@ -0,0 +1,8 @@ +# export mariadb_version='latest' +# export mysql_version='latest' + +# export db_root_pass='9483ujtej0--=0FFFdl' + +export db_name='mhhusspndh' +export db_user='mhhusspndh' +export db_pass='w9Chzh6fR4' diff --git a/config/remote/mariadb b/config/remote/mariadb deleted file mode 100644 index afc873a..0000000 --- a/config/remote/mariadb +++ /dev/null @@ -1,4 +0,0 @@ -## uncomment if using mariadb -# mariadb_version='latest' -# db_root_pass='9483ujtej0--=0FFFdl' - diff --git a/config/remote/mysql b/config/remote/mysql deleted file mode 100644 index 4b5cf1a..0000000 --- a/config/remote/mysql +++ /dev/null @@ -1,3 +0,0 @@ -## uncomment if using mysql -#mysql_version='latest' -#db_root_pass='9483ujtej0--=0FFFdl' diff --git a/config/remote/nginx b/config/remote/nginx deleted file mode 100644 index 37f2e01..0000000 --- a/config/remote/nginx +++ /dev/null @@ -1,5 +0,0 @@ -## nginx configuration - -## uncomment if using nginx -#nginx_version='latest' - diff --git a/config/remote/litespeed b/config/remote/webserver similarity index 65% rename from config/remote/litespeed rename to config/remote/webserver index 079ea89..0b76e1f 100644 --- a/config/remote/litespeed +++ b/config/remote/webserver @@ -1,10 +1,15 @@ -## litespeed configuration -## uncomment if using litespeed +# apache2_version='latest' + +#nginx_version='latest' ## specify specific version from latest, 54, 55, 56, 70, 71, 72, 73 or 74 #export litespeed_version='latest' -## php version +###################### +# litespeed specific # +###################### + +## litespeed php version #export ls_lsphp_version='73' ## https://openlitespeed.org/kb/1-click-install/ diff --git a/install.sh b/install.sh index a9e0b8e..6824b4d 100755 --- a/install.sh +++ b/install.sh @@ -18,11 +18,6 @@ for _file in ./config/$_target/* ; do . "$_file" done -if [ "$_target" = remote ] && [ -n "$cloudways_user" ] ; then - echo "Using Cloudways - nothing to install" - exit -fi - # source script files if [ -n "$_target_os" ] ; then _script_dir="./scripts/$_target_os" diff --git a/old/server-install-litespeed.sh b/old/server-install-litespeed.sh index d4b6653..53a3655 100755 --- a/old/server-install-litespeed.sh +++ b/old/server-install-litespeed.sh @@ -24,9 +24,9 @@ if [ -n "$wp_user" ] ; then --wordpressplus "$url" \ --wordpresspath "$wp_path" \ --dbrootpassword "$db_root_pass" \ - --dbpassword "$wp_db_pass" \ - --dbname "$wp_db_name" \ - --dbuser "$wp_db_user" \ + --dbpassword "$db_pass" \ + --dbname "$db_name" \ + --dbuser "$db_user" \ --wpuser "$wp_user" \ --wppassword "$wp_pass" \ && ufw allow 7080 diff --git a/old/wp-export.sh b/old/wp-export.sh index efaba7b..3aa017a 100755 --- a/old/wp-export.sh +++ b/old/wp-export.sh @@ -16,7 +16,7 @@ db_file="$wp_path/data.sql" -wp db export --dbuser=wordpress --dbpass=$wp_db_pass --add-drop-table --alow-root "$db_file" +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" diff --git a/scripts/debian10/install-mariadb.sh b/scripts/debian10/install-mariadb.sh index 853b86e..77f69c2 100755 --- a/scripts/debian10/install-mariadb.sh +++ b/scripts/debian10/install-mariadb.sh @@ -24,6 +24,10 @@ ssh -T $ssh << EOSSH $_mysql_cmd "DROP DATABASE IF EXISTS test;" $_mysql_cmd "DELETE FROM mysql.db WHERE Db='test' OR Db='"'test\\_%'"'" + $_mysql_cmd "CREATE DATABASE $db_name;" + $_mysql_cmd "GRANT ALL PRIVILEGES ON $db_name.* TO '$db_user'@'localhost' IDENTIFIED BY '$db_pass';" + $_mysql_cmd "FLUSH PRIVILEGES;" + mysqladmin --user=root password "$db_root_pass" mysqladmin --user=root --password="$db_root_pass" flush-privileges EOSSH diff --git a/scripts/debian10/install-mysql.sh b/scripts/debian10/install-mysql.sh index 8a56266..2f08c59 100755 --- a/scripts/debian10/install-mysql.sh +++ b/scripts/debian10/install-mysql.sh @@ -24,6 +24,10 @@ ssh -T $ssh << EOSSH $_mysql_cmd "DROP DATABASE IF EXISTS test;" $_mysql_cmd "DELETE FROM mysql.db WHERE Db='test' OR Db='"'test\\_%'"'" + $_mysql_cmd "CREATE DATABASE $db_name;" + $_mysql_cmd "GRANT ALL PRIVILEGES ON $db_name.* TO '$db_user'@'localhost' IDENTIFIED BY '$db_pass';" + $_mysql_cmd "FLUSH PRIVILEGES;" + mysqladmin --user=root password "$db_root_pass" mysqladmin --user=root --password="$db_root_pass" flush-privileges EOSSH diff --git a/scripts/debian10/install-wordpress.sh b/scripts/debian10/install-wordpress.sh index 67fcc14..604acb4 100755 --- a/scripts/debian10/install-wordpress.sh +++ b/scripts/debian10/install-wordpress.sh @@ -1,7 +1,5 @@ echo "Installing WordPress .." -_mysql_cmd="mysql -uroot -p$db_root_pass -e " - ssh -T $ssh << EOSSH # install wp-cli first @@ -15,15 +13,6 @@ su "$user" if wp core is-installed --quiet --path="$wp_path" ; then echo "WordPress already installed" else - # first create database and user - if command -v mysql ; then - $_mysql_cmd "CREATE DATABASE $wp_db_name;" - $_mysql_cmd "GRANT ALL PRIVILEGES ON $wp_db_name.* TO '$wp_db_user'@'localhost' IDENTIFIED BY '$wp_db_pass';" - $_mysql_cmd "FLUSH PRIVILEGES;" - else - echo "ERROR: mysql not found - aborting WordPress install" - exit 40 - fi wp core download \ --version="$wp_version" \ --path="$wp_path" \ @@ -31,9 +20,9 @@ else --locale="$wp_locale" wp config create \ --path="$wp_path" \ - --dbname="$wp_db_name" \ - --dbuser="$wp_db_user" \ - --dbpass="$wp_db_pass" \ + --dbname="$db_name" \ + --dbuser="$db_user" \ + --dbpass="$db_pass" \ --locale="$wp_locale" \ --extra-php <