tidy up
This commit is contained in:
parent
89d8286021
commit
c107c755fc
|
@ -1,10 +1 @@
|
|||
|
||||
Development environment base packages:
|
||||
|
||||
* nvm
|
||||
* lf
|
||||
* lazygit
|
||||
|
||||
## TODO
|
||||
|
||||
* make sure to use export in all config files (the newer ones aren't)
|
||||
Installation scripts for local/remote servers with development environment.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## php configuration
|
||||
#
|
||||
## uncomment if using php
|
||||
#export php_version='latest'
|
||||
export php_version='latest'
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
apache2_version='latest'
|
||||
export apache2_version='latest'
|
||||
|
||||
#nginx_version='latest'
|
||||
#export nginx_version='latest'
|
||||
|
||||
## specify specific version from latest, 54, 55, 56, 70, 71, 72, 73 or 74
|
||||
#export litespeed_version='latest'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## php configuration
|
||||
#
|
||||
## uncomment if using php
|
||||
# php_version='latest'
|
||||
#export php_version='latest'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# apache2_version='latest'
|
||||
#export apache2_version='latest'
|
||||
|
||||
#nginx_version='latest'
|
||||
#export nginx_version='latest'
|
||||
|
||||
## specify specific version from latest, 54, 55, 56, 70, 71, 72, 73 or 74
|
||||
#export litespeed_version='latest'
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
_target="$1"
|
||||
|
||||
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
|
||||
|
||||
# check we have ssh access
|
||||
[ -z "$ssh_user" ] && echo "Error: no user ssh configuration specified" && exit 5
|
||||
|
||||
if [ -n "$wp_user" ] ; then
|
||||
. ./scripts/export-wp.sh
|
||||
fi
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Exporting from $url .."
|
||||
|
||||
_timestamp="$(date +%s)"
|
||||
_db_filename="wordpress-$_timestamp.db"
|
||||
_archive_filename="wordpress-$_timestamp.tar.gz"
|
||||
_local_dest_dir="./data/$_target"
|
||||
|
||||
# check we have ssh access
|
||||
[ -z "$ssh_user" ] && echo "Error: no user ssh configuration specified" && exit 5
|
||||
|
||||
ssh -T $ssh_user << EOSSH
|
||||
cd "$wp_path"
|
||||
wp db export \
|
||||
--path="$wp_path" \
|
||||
--dbuser="$db_user" \
|
||||
--dbpass="$db_pass" \
|
||||
--add-drop-table \
|
||||
--allow-root \
|
||||
"/tmp/$_db_filename"
|
||||
tar czf "/tmp/$_archive_filename" "$wp_path"
|
||||
EOSSH
|
||||
|
||||
scp "$ssh_user:/tmp/$_archive_filename" "$_local_dest_dir/$_archive_filename"
|
||||
scp "$ssh_user:/tmp/$_db_filename" "$_local_dest_dir/$_db_filename"
|
||||
|
||||
exit
|
||||
ssh -T $ssh_user << EOSSH
|
||||
rm "/tmp/$_db_filename"
|
||||
rm "/tmp/$_archive_filename"
|
||||
EOSSH
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
Loading…
Reference in New Issue