diff --git a/debian10/config/local/apache b/config/local/apache similarity index 100% rename from debian10/config/local/apache rename to config/local/apache diff --git a/debian10/config/local/litespeed b/config/local/litespeed similarity index 100% rename from debian10/config/local/litespeed rename to config/local/litespeed diff --git a/debian10/config/local/local b/config/local/local similarity index 100% rename from debian10/config/local/local rename to config/local/local diff --git a/debian10/config/local/mariadb b/config/local/mariadb similarity index 100% rename from debian10/config/local/mariadb rename to config/local/mariadb diff --git a/debian10/config/local/mysql b/config/local/mysql similarity index 100% rename from debian10/config/local/mysql rename to config/local/mysql diff --git a/debian10/config/local/nginx b/config/local/nginx similarity index 100% rename from debian10/config/local/nginx rename to config/local/nginx diff --git a/debian10/config/local/php b/config/local/php similarity index 100% rename from debian10/config/local/php rename to config/local/php diff --git a/debian10/config/local/ssh b/config/local/ssh similarity index 100% rename from debian10/config/local/ssh rename to config/local/ssh diff --git a/debian10/config/local/user b/config/local/user similarity index 100% rename from debian10/config/local/user rename to config/local/user diff --git a/debian10/config/local/wordpress b/config/local/wordpress similarity index 100% rename from debian10/config/local/wordpress rename to config/local/wordpress diff --git a/debian10/config/remote/apache b/config/remote/apache similarity index 100% rename from debian10/config/remote/apache rename to config/remote/apache diff --git a/debian10/config/remote/litespeed b/config/remote/litespeed similarity index 100% rename from debian10/config/remote/litespeed rename to config/remote/litespeed diff --git a/debian10/config/remote/local b/config/remote/local similarity index 100% rename from debian10/config/remote/local rename to config/remote/local diff --git a/debian10/config/remote/mariadb b/config/remote/mariadb similarity index 100% rename from debian10/config/remote/mariadb rename to config/remote/mariadb diff --git a/debian10/config/remote/mysql b/config/remote/mysql similarity index 100% rename from debian10/config/remote/mysql rename to config/remote/mysql diff --git a/debian10/config/remote/nginx b/config/remote/nginx similarity index 100% rename from debian10/config/remote/nginx rename to config/remote/nginx diff --git a/debian10/config/remote/php b/config/remote/php similarity index 100% rename from debian10/config/remote/php rename to config/remote/php diff --git a/debian10/config/remote/ssh b/config/remote/ssh similarity index 100% rename from debian10/config/remote/ssh rename to config/remote/ssh diff --git a/debian10/config/remote/user b/config/remote/user similarity index 100% rename from debian10/config/remote/user rename to config/remote/user diff --git a/debian10/config/remote/wordpress b/config/remote/wordpress similarity index 100% rename from debian10/config/remote/wordpress rename to config/remote/wordpress diff --git a/debian10/export-to-remote.sh b/export-to-remote.sh similarity index 100% rename from debian10/export-to-remote.sh rename to export-to-remote.sh diff --git a/debian10/import-from-remote.sh b/import-from-remote.sh similarity index 100% rename from debian10/import-from-remote.sh rename to import-from-remote.sh diff --git a/debian10/install-local.sh b/install-local.sh similarity index 52% rename from debian10/install-local.sh rename to install-local.sh index d6a6395..bacd5c2 100755 --- a/debian10/install-local.sh +++ b/install-local.sh @@ -1,5 +1,18 @@ #!/bin/sh +# default scripts to use +_script_dir='./debian10/scripts' + +if [ -n "$1" ] ; then + _script_dir="./$1/scripts/" + if ! [ -d "$_script_dir" ] ; then + echo "Error: script directory not found '$_script_dir'" + exit 1 + fi +fi + +echo "Using Scripts in: $_script_dir" + # source our config files for _file in ./config/local/* ; do . "$_file" @@ -15,31 +28,31 @@ ssh -T $ssh << EOSSH EOSSH echo "Update complete" -. ./scripts/install-user.sh -. ./scripts/install-base.sh +. "$_script_dir/install-user.sh" +. "$_script_dir/install-base.sh" if [ -n "$php_version" ] ; then -. ./scripts/install-php.sh +. "$_script_dir/install-php.sh" fi if [ -n "$mariadb_version" ] ; then - . ./scripts/install-mariadb.sh + . "$_script_dir/install-mariadb.sh" elif [ -n "$mysql_version" ] ; then - . ./scripts/install-mysql.sh + . "$_script_dir/install-mysql.sh" fi if [ -n "$apache2_version" ] ; then - . ./scripts/install-apache2.sh + . "$_script_dir/install-apache2.sh" elif [ -n "$nginx_version" ] ; then # TODO nginx install script - echo 'TODO . ./scripts/install-nginx.sh' + echo 'TODO - nginx install script' elif [ -n "$litespeed_version" ] ; then # TODO - echo 'TODO . ./scripts/install-litespeed.sh' + echo 'TODO litespeed install script' fi if [ -n "$wp_user" ] ; then -. ./scripts/install-wordpress.sh +. "$_script_dir/install-wordpress.sh" fi # TODO source dev env script diff --git a/debian10/install-remote.sh b/install-remote.sh similarity index 100% rename from debian10/install-remote.sh rename to install-remote.sh