From db34ac007a4f186be86e7b7d8ced09e7d2ab2565 Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 4 Sep 2020 15:25:22 +0100 Subject: [PATCH] remove un-needed files --- old/config-local | 41 ------------------ old/config-remote | 41 ------------------ old/dev-env-install.sh | 3 -- old/server-install-apache.sh | 17 -------- old/server-install-base.sh | 24 ----------- old/server-tsl.sh | 3 -- old/user-add.sh | 3 -- old/wp-import.sh | 3 -- old/wp-install.sh | 80 ------------------------------------ 9 files changed, 215 deletions(-) delete mode 100755 old/config-local delete mode 100644 old/config-remote delete mode 100755 old/dev-env-install.sh delete mode 100755 old/server-install-apache.sh delete mode 100755 old/server-install-base.sh delete mode 100755 old/server-tsl.sh delete mode 100755 old/user-add.sh delete mode 100755 old/wp-import.sh delete mode 100755 old/wp-install.sh diff --git a/old/config-local b/old/config-local deleted file mode 100755 index df38e7e..0000000 --- a/old/config-local +++ /dev/null @@ -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' diff --git a/old/config-remote b/old/config-remote deleted file mode 100644 index a955d7c..0000000 --- a/old/config-remote +++ /dev/null @@ -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' diff --git a/old/dev-env-install.sh b/old/dev-env-install.sh deleted file mode 100755 index 829303e..0000000 --- a/old/dev-env-install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - - diff --git a/old/server-install-apache.sh b/old/server-install-apache.sh deleted file mode 100755 index b169b57..0000000 --- a/old/server-install-apache.sh +++ /dev/null @@ -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 diff --git a/old/server-install-base.sh b/old/server-install-base.sh deleted file mode 100755 index 4bbf6ff..0000000 --- a/old/server-install-base.sh +++ /dev/null @@ -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 diff --git a/old/server-tsl.sh b/old/server-tsl.sh deleted file mode 100755 index 829303e..0000000 --- a/old/server-tsl.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - - diff --git a/old/user-add.sh b/old/user-add.sh deleted file mode 100755 index 829303e..0000000 --- a/old/user-add.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - - diff --git a/old/wp-import.sh b/old/wp-import.sh deleted file mode 100755 index 829303e..0000000 --- a/old/wp-import.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - - diff --git a/old/wp-install.sh b/old/wp-install.sh deleted file mode 100755 index c4165c1..0000000 --- a/old/wp-install.sh +++ /dev/null @@ -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