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" echo "Error: must specify 'local' or 'remote' target"
exit 1 exit 1
fi fi
echo "Loading $_target configuration" echo "Loading $_target configuration"
# source our config files # source our config files
for _file in ./config/$_target/* ; do for _file in ./config/$_target/* ; do
[ -e "$_file" ] || continue [ -e "$_file" ] || continue
echo " reading config: $_file"
. "$_file" . "$_file"
done done
if [ "$_target" = remote ] && [ -n "$cloudways_user" ] ; then
echo "Using Cloudways - nothing to install"
exit
fi
# source script files
if [ -n "$_target_os" ] ; then if [ -n "$_target_os" ] ; then
_script_dir="./scripts/$_target_os" _script_dir="./scripts/$_target_os"
if ! [ -d "$_script_dir" ] ; then if ! [ -d "$_script_dir" ] ; then
@ -31,8 +37,6 @@ echo "Using Scripts in: $_script_dir"
# check we have ssh access # check we have ssh access
[ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5 [ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5
exit
# update # update
echo "Updating .." echo "Updating .."
ssh -T $ssh << EOSSH ssh -T $ssh << EOSSH