From ce0dc655906cc86aacbc4ea0cf06208b3955c454 Mon Sep 17 00:00:00 2001 From: ray Date: Sat, 5 Sep 2020 12:01:33 +0100 Subject: [PATCH] add cloudways config --- config/remote/cloudways | 8 ++++++++ install.sh | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 config/remote/cloudways diff --git a/config/remote/cloudways b/config/remote/cloudways new file mode 100644 index 0000000..c16651d --- /dev/null +++ b/config/remote/cloudways @@ -0,0 +1,8 @@ +# cloudways configuration + +. ./config/remote/cloudways.secret + +cloudways_user='cloudways@rayelliott.dev' +cloudways_url='https://wordpress-453075-1468300.cloudwaysapps.com' +cloudways_db_name='mhhusspndh' +cloudways_db_user='mhhusspndh' diff --git a/install.sh b/install.sh index 4cfd633..a9e0b8e 100755 --- a/install.sh +++ b/install.sh @@ -9,15 +9,21 @@ if ! [ "$_target" = local ] && ! [ "$_target" = remote ] ; then echo "Error: must specify 'local' or 'remote' target" exit 1 fi + echo "Loading $_target configuration" # source our config files for _file in ./config/$_target/* ; do [ -e "$_file" ] || continue - echo " reading config: $_file" . "$_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" if ! [ -d "$_script_dir" ] ; then @@ -31,8 +37,6 @@ echo "Using Scripts in: $_script_dir" # check we have ssh access [ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5 -exit - # update echo "Updating .." ssh -T $ssh << EOSSH