diff --git a/install.sh b/install.sh index 6167c04..4cfd633 100755 --- a/install.sh +++ b/install.sh @@ -9,9 +9,12 @@ 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/local/* ; do +for _file in ./config/$_target/* ; do + [ -e "$_file" ] || continue + echo " reading config: $_file" . "$_file" done @@ -28,6 +31,8 @@ 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 @@ -37,32 +42,32 @@ EOSSH echo "Update complete" . "$_script_dir/install-user.sh" -. "$_script_dir/install-base.sh" - -if [ -n "$php_version" ] ; then -. "$_script_dir/install-php.sh" -fi - -if [ -n "$mariadb_version" ] ; then - . "$_script_dir/install-mariadb.sh" -elif [ -n "$mysql_version" ] ; then - . "$_script_dir/install-mysql.sh" -fi - -if [ -n "$apache2_version" ] ; then - . "$_script_dir/install-apache2.sh" -elif [ -n "$nginx_version" ] ; then - # TODO nginx install script - echo 'TODO - nginx install script' -elif [ -n "$litespeed_version" ] ; then - # TODO - echo 'TODO litespeed install script' -fi - -if [ -n "$wp_user" ] ; then - . "$_script_dir/install-wordpress.sh" -fi - -if [ -n "$dev_env" ] ; then - . "$_script_dir/install-dev-base.sh" -fi +# . "$_script_dir/install-base.sh" +# +# if [ -n "$php_version" ] ; then +# . "$_script_dir/install-php.sh" +# fi +# +# if [ -n "$mariadb_version" ] ; then +# . "$_script_dir/install-mariadb.sh" +# elif [ -n "$mysql_version" ] ; then +# . "$_script_dir/install-mysql.sh" +# fi +# +# if [ -n "$apache2_version" ] ; then +# . "$_script_dir/install-apache2.sh" +# elif [ -n "$nginx_version" ] ; then +# # TODO nginx install script +# echo 'TODO - nginx install script' +# elif [ -n "$litespeed_version" ] ; then +# # TODO +# echo 'TODO litespeed install script' +# fi +# +# if [ -n "$wp_user" ] ; then +# . "$_script_dir/install-wordpress.sh" +# fi +# +# if [ -n "$dev_env" ] ; then +# . "$_script_dir/install-dev-base.sh" +# fi