Compare commits
No commits in common. "ce0dc655906cc86aacbc4ea0cf06208b3955c454" and "c6efac505ccb825dbbbf7a0917cc7e1bb4bddba9" have entirely different histories.
ce0dc65590
...
c6efac505c
|
@ -1,2 +1 @@
|
||||||
files/private
|
files/private
|
||||||
*.secret
|
|
||||||
|
|
|
@ -7,4 +7,6 @@ Development environment base packages:
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
|
* combine install-local.sh and install-remote.sh into one script that takes
|
||||||
|
an argument of local/remote
|
||||||
* get remote working with cloudways
|
* get remote working with cloudways
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## apache configuration
|
## apache configuration
|
||||||
#
|
|
||||||
## uncomment if using apache
|
## uncomment if using apache
|
||||||
# apache2_version='latest'
|
#apache2_version='latest'
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# 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'
|
|
|
@ -9,5 +9,5 @@
|
||||||
|
|
||||||
## https://openlitespeed.org/kb/1-click-install/
|
## https://openlitespeed.org/kb/1-click-install/
|
||||||
## password used to log into litespeed web interface
|
## password used to log into litespeed web interface
|
||||||
#export ls_webadmin_pass='admin'
|
#export ls_webadmin_pass='x7__+85676--Dd'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
## uncomment if using mariadb
|
## uncomment if using mariadb
|
||||||
# mariadb_version='latest'
|
#mariadb_version='latest'
|
||||||
# db_root_pass='9483ujtej0--=0FFFdl'
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
## uncomment if using mysql
|
## uncomment if using mysql
|
||||||
#mysql_version='latest'
|
#mysql_version='latest'
|
||||||
#db_root_pass='9483ujtej0--=0FFFdl'
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
## php configuration
|
## php configuration
|
||||||
#
|
#
|
||||||
## uncomment if using php
|
## uncomment if using php
|
||||||
# php_version='latest'
|
#php_version='latest'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
## ssh configuration
|
## ssh configuration
|
||||||
|
|
||||||
## uncomment if connecting via ssh
|
## uncomment if connecting via ssh
|
||||||
# export ssh='root@test123.isnet.uk'
|
#export ssh='root@test123.example.com'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
## user configuration
|
## user configuration
|
||||||
## uncomment to set user
|
## uncomment to set user
|
||||||
|
|
||||||
# export user='ray'
|
## webuser/webgroup
|
||||||
# export user_pass='ray'
|
## leave commented for default
|
||||||
# export group='ray'
|
#export webuser='www-data'
|
||||||
|
#export webgroup='www-data'
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
## wordpress configuration - uncomment if using wordpress
|
## wordpress configuration - uncomment if using wordpress
|
||||||
|
|
||||||
# export wp_user='admin'
|
# export wp_user='admin'
|
||||||
# export wp_pass='admin'
|
# export wp_pass=''
|
||||||
# export wp_email='myemail@isnet.uk'
|
|
||||||
|
|
||||||
# export wp_version='latest'
|
## leave commented if using default
|
||||||
# export wp_path='/var/www/html/wordpress'
|
# export wp_path='/var/www/html/wordpress'
|
||||||
# export wp_locale='en_GB'
|
|
||||||
# export wp_title='The WordPress'
|
|
||||||
|
|
||||||
|
# export db_root_pass='9dn,s93j_UU9--s889d8dUY'
|
||||||
# export wp_db_name='wordpress'
|
# export wp_db_name='wordpress'
|
||||||
# export wp_db_user='wordpress'
|
# export wp_db_user='wordpress'
|
||||||
# export wp_db_pass='wordpress'
|
# export wp_db_pass='__d39fhi3nkjdflk8-ddWEs'
|
||||||
|
|
||||||
## list of themes to install - first one will be activated
|
## list of themes to install - first one will be activate
|
||||||
# export wp_themes="twentytwenty"
|
# export wp_themes="twentytwenty"
|
||||||
|
|
||||||
## list of plugins to install
|
## list of plugins to install
|
||||||
# export wp_plugins="akismet all-in-one-seo-pack"
|
# export wp_plugins=""
|
||||||
|
|
||||||
## list of plugins to install and activate
|
## list of plugins to activate
|
||||||
# export wp_plugins_active=""
|
# export wp_plugins_active=""
|
||||||
|
|
||||||
|
## list of plugins to uninstall
|
||||||
|
# export wp_plugins_uninstall="hello aksimet"
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# default scripts to use
|
||||||
|
_script_dir='./scripts/debian10'
|
||||||
|
|
||||||
|
if [ -n "$1" ] ; then
|
||||||
|
_script_dir="./scripts/$1"
|
||||||
|
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"
|
||||||
|
done
|
||||||
|
|
||||||
|
# check we have ssh access
|
||||||
|
[ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5
|
||||||
|
|
||||||
|
# update local server
|
||||||
|
echo "Updating .."
|
||||||
|
ssh -T $ssh << EOSSH
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get -qq -y update && apt-get -qq -y upgrade
|
||||||
|
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
|
||||||
|
|
77
install.sh
77
install.sh
|
@ -1,77 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
_target="$1"
|
|
||||||
_target_os="$2"
|
|
||||||
# default scripts to use
|
|
||||||
_script_dir='./scripts/debian10'
|
|
||||||
|
|
||||||
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
|
|
||||||
. "$_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
|
|
||||||
echo "Error: script directory not found '$_script_dir'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using Scripts in: $_script_dir"
|
|
||||||
|
|
||||||
# check we have ssh access
|
|
||||||
[ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5
|
|
||||||
|
|
||||||
# update
|
|
||||||
echo "Updating .."
|
|
||||||
ssh -T $ssh << EOSSH
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
apt-get -qq -y update && apt-get -qq -y upgrade
|
|
||||||
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
|
|
Loading…
Reference in New Issue