remove un-needed files

This commit is contained in:
Ray Elliott 2020-09-04 15:25:22 +01:00
parent 2e8fb2edb9
commit db34ac007a
9 changed files with 0 additions and 215 deletions

View File

@ -1,41 +0,0 @@
#!/bin/sh
export domain='test123.home'
export url='http://test123.home'
export ssh='root@test123.home'
# webuser/webgroup not yet implemented
export webuser='ray'
export webgroup='ray'
export db_root_pass='root'
export wp_db_name='wordpress'
export wp_db_user='wordpress'
export wp_db_pass='wordpress'
export wp_path='/var/www/html/wordpress'
export wp_user='admin'
export wp_pass='admin'
# list of themes to install - first one will be activate
export wp_themes="twentytwenty"
export wp_plugins=""
export wp_plugins_active="block-lab"
export wp_plugins_uninstall="hello aksimet"
export php_version=''
# set one of
export mariadb_version=''
export mysql_version=''
# set one of
export apache2_version=''
export nginx_version=''
# LSPHPVERLIST=(54 55 56 70 71 72 73 74)
export litespeed_version='latest'
#set if using litespeed
# https://openlitespeed.org/kb/1-click-install/
# password used to log into litespeed web interface)
export ls_webadmin_pass='admin'
export ls_lsphp_version='73'

View File

@ -1,41 +0,0 @@
#!/bin/sh
export domain='test123.isnet.uk'
export url='http://test123.isnet.uk'
export ssh='root@test123.isnet.uk'
# webuser/webgroup not yet implemented
export webuser=''
export webgroup=''
export db_root_pass='39dn,s9889d89--sdj_UUUY'
export wp_db_name='wordpress'
export wp_db_user='wordpress'
export wp_db_pass='39fhi3nkjdf__dlk8-ddWEs'
export wp_path='/var/www/html/wordpress'
export wp_user='admin'
export wp_pass='f988888--3XSD'
# list of themes to install - first one will be activate
export wp_themes="twentytwenty"
export wp_plugins=""
export wp_plugins_active=""
export wp_plugins_uninstall="hello aksimet"
export php_version=''
# set one of
export mariadb_version=''
export mysql_version=''
# set one of
export apache2_version=''
export nginx_version=''
# LSPHPVERLIST=(54 55 56 70 71 72 73 74)
export litespeed_version='latest'
#set if using litespeed
# https://openlitespeed.org/kb/1-click-install/
# password used to log into litespeed web interface)
export ls_webadmin_pass='x7856----DD'
export ls_lsphp_version='73'

View File

@ -1,3 +0,0 @@
#!/bin/sh

View File

@ -1,17 +0,0 @@
#!/bin/sh
if [ -z "$1" ] ; then
echo "error: must specify configuration file to use"
exit 5
fi
. ./"$1"
ssh -T $src_ssh << EOSSH
ufw allow http && ufw allow https
echo "TODO install apache"
exit 1
EOSSH

View File

@ -1,24 +0,0 @@
#!/bin/sh
if [ -z "$1" ] ; then
echo "error: must specify configuration file to use"
exit 5
fi
. ./"$1"
ssh -T $ssh << EOSSH
apt update || exit 5
apt upgrade -y || exit 10
apt install -y tmux ufw curl || exit 15
sed -i '/PubkeyAuthentication/c\PubkeyAuthentication yes' /etc/ssh/sshd_config
sed -i '/PasswordAuthentication/c\PasswordAuthentication no' /etc/ssh/sshd_config
sed -i '/PermitRootLogin/c\PermitRootLogin prohibit-password' /etc/ssh/sshd_config
systemctl restart sshd
ufw allow ssh || exit 20
yes | ufw enable
EOSSH

View File

@ -1,3 +0,0 @@
#!/bin/sh

View File

@ -1,3 +0,0 @@
#!/bin/sh

View File

@ -1,3 +0,0 @@
#!/bin/sh

View File

@ -1,80 +0,0 @@
#!/bin/sh
if [ -z "$1" ] ; then
echo "error: must specify configuration file to use"
exit 5
fi
. ./"$1"
ssh -T $ssh << EOSSH
if [ -n "$php_version" ] ; then
echo "TODO - install specific PHP version"
exit 1
elif ! php ; then
apt install -y php-fpm php-bcmath php-curl php-gd php-imagick php-mbstring \
php-mysql php-soap php-xml php-zip
fi
php_config_file=$(php --ini | grep Loaded | awk '{ print $4 }')
sed -i '/memory_limit/c\memory_limit = 256M' "$php_config_file"
sed -i '/upload_max_filesize/c\upload_max_filesize = 64M' "$php_config_file"
sed -i '/post_max_size/c\post_max_size = 64M' "$php_config_file"
sed -i '/max_execution_time/c\max_execution_time = 300M' "$php_config_file"
sed -i '/max_input_time/c\max_input_time = 1000' "$php_config_file"
# install wp-cli first
if [ ! -f /usr/local/bin/wp ] ; then
wget -nv -O /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x /usr/local/bin/wp
fi
if wp core is-installed --quiet --path="$wp_path" --allow-root ; then
echo "WordPress already installed"
else
echo "TODO - install WordPress"
fi
if [ -n "$wp_themes" ] ; then
printf "\nInstalling themes ..."
option='--activate'
for theme in $wp_themes ; do
echo " installing $theme ..."
wp theme install $theme "$option" --path="$wp_path" --allow-root
option=''
done
fi
if [ -n "$wp_plugins" ] ; then
printf "\nInstalling plugins ..."
for plugin in $wp_plugins ; do
echo " installing $plugin ..."
wp plugin install $plugin --path="$wp_path" --allow-root
done
fi
if [ -n "$wp_plugins_active" ] ; then
printf "\nInstalling plugins to activate ..."
for plugin in $wp_plugins_active ; do
echo " installing $plugin ..."
wp plugin install $plugin --activate --path="$wp_path" --allow-root
done
fi
if [ -n "$wp_plugins_active" ] ; then
printf "\nUninstalling plugins ..."
for plugin in $wp_plugins_uninstall ; do
echo " installing $plugin ..."
wp plugin deactivate $plugin --path="$wp_path" --allow-root
wp plugin uninstall $plugin --path="$wp_path" --allow-root
done
fi
# TODO determine web user programatically
ownergroup='www-data:www-data'
if [ -n "$litespeed_version" ] ; then
ownergroup='nobody:nogroup'
fi
chown -R "$ownergroup" "$wp_path"
EOSSH