add cloudways config

This commit is contained in:
Ray Elliott 2020-09-05 12:01:33 +01:00
parent 29861e9be2
commit ce0dc65590
2 changed files with 15 additions and 3 deletions

8
config/remote/cloudways Normal file
View File

@ -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'

View File

@ -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