diff --git a/README.md b/README.md index 95eab50..7cd23b2 100644 --- a/README.md +++ b/README.md @@ -1,12 +1 @@ -All scripts require an argument to specify 'local' or 'remote'. - -If none given script will exit. - -Using 'local' will: -set the source server URL to `$local_url`. -set the destination server URL to `$remote_url`. - -Using 'remote' will: -set the source server URL to `$remote_url`. -set the destination server URL to `$local_url`. - +Development helper scripts. diff --git a/config-example b/config-example deleted file mode 100755 index ccf7db9..0000000 --- a/config-example +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -export local_domain='' -export local_url='' -export remote_url='' - -export local_ssh='' -export remote_ssh='' - -export username='' -export webuser='' -export db_root_pass='' -export wp_db_name='' -export wp_db_user='' -export wp_db_pass='' -export wp_path='' -export wp_user='' -export wp_pass='' - -# list of themes to install - first one will be activate -export wp_themes="" -export wp_plugins="" -export wp_plugins_active="" -export wp_plugins_uninstall="" - -export php_version='' - -# set one of -export mariadb_version='' -export mysql_version='' - -# set one of -export apache2_version='' -export nginx_version='' -export litespeed_version='' - -#set if using litespeed -# https://openlitespeed.org/kb/1-click-install/ -# password used to log into litespeed web interface) -export ls_webadmin_pass='' -export ls_lsphp_version='' diff --git a/config-local b/config-local index 0bc4729..df38e7e 100755 --- a/config-local +++ b/config-local @@ -4,9 +4,11 @@ export url='http://test123.home' export ssh='root@test123.home' -export username='root' -export webuser='' -export db_root_pass='39dn,s9889d89--sdj_UUUY' +# webuser/webgroup not yet implemented +export webuser='ray' +export webgroup='ray' + +export db_root_pass='root' export wp_db_name='wordpress' export wp_db_user='wordpress' export wp_db_pass='wordpress' diff --git a/config-remote b/config-remote index d3b706a..a955d7c 100644 --- a/config-remote +++ b/config-remote @@ -4,8 +4,10 @@ export url='http://test123.isnet.uk' export ssh='root@test123.isnet.uk' -export username='root' +# webuser/webgroup not yet implemented export webuser='' +export webgroup='' + export db_root_pass='39dn,s9889d89--sdj_UUUY' export wp_db_name='wordpress' export wp_db_user='wordpress' diff --git a/wp-install.sh b/wp-install.sh index 6e88e10..c4165c1 100755 --- a/wp-install.sh +++ b/wp-install.sh @@ -1,21 +1,13 @@ #!/bin/sh -. ./config - -if [ "$1" = 'local' ] ; then - src_url="$local_url"; - dest_url="$remote_url"; - src_ssh="$local_ssh" -elif [ "$1" = 'remote' ] ; then - src_url="$remote_url"; - dest_url="$local_url"; - src_ssh="$remote_ssh" -else - echo "error: must specify local or remote" +if [ -z "$1" ] ; then + echo "error: must specify configuration file to use" exit 5 fi -ssh -T $src_ssh << EOSSH +. ./"$1" + +ssh -T $ssh << EOSSH if [ -n "$php_version" ] ; then echo "TODO - install specific PHP version"