Compare commits
9 Commits
Main-v1.0.
...
Main-v1.1-
| Author | SHA1 | Date | |
|---|---|---|---|
|
59a256c590
|
|||
|
c3839afdc4
|
|||
|
38b1e8560f
|
|||
|
4c25b3456f
|
|||
|
18ea88f6dc
|
|||
|
3c7683684a
|
|||
|
0ab3c8bc44
|
|||
|
64ce1701be
|
|||
|
aeb20247ab
|
@@ -109,8 +109,8 @@ if [ $IMODE = l ]; then
|
||||
done
|
||||
read -p "Set sitename to ${domain//./_}? (y/n)" choice
|
||||
case "$choice" in
|
||||
y|Y ) sitename=${domain//./_};;
|
||||
n|N ) echo "";
|
||||
y*|Y* ) sitename=${domain//./_};;
|
||||
n*|N* ) echo "";
|
||||
while true; do
|
||||
echo "Please enter sitename, Must NOT contain special characters, except: _";read sitename
|
||||
if [[ $sitename == *['!'@#\$%^\&*()+,.]* ]] || [ -z "$sitename" ]
|
||||
|
||||
@@ -25,8 +25,6 @@ define('FS_METHOD','direct');
|
||||
#$table_prefix = 'DBName';
|
||||
$table_prefix = 'wp';
|
||||
|
||||
WPsalty
|
||||
|
||||
define('WP_DEBUG', false);
|
||||
if ( !defined('ABSPATH') )
|
||||
define('ABSPATH', dirname(__FILE__) . '/');
|
||||
@@ -39,4 +37,4 @@ if ( !defined('ABSPATH') )
|
||||
#define('WP_REDIS_HOST', '127.0.0.1');
|
||||
#define('WP_REDIS_PASSWORD', '<RedisPassword>');
|
||||
#define('WP_REDIS_PORT', '6379');
|
||||
require_once(ABSPATH . 'wp-settings.php');
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ rm /var/www/"$domain"/html/wp-config-sample.php
|
||||
#Configuring WordPress
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/WordPress-unconfigured -o /var/www/"$domain"/html/wp-config.php
|
||||
sed -i -e 's/DBPass/'$db_pass'/' -e 's/DBUser/'$db_user'/' -e 's/DBName/'$db_name'/' -e 's/DOMAINname/'$domain'/' /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "g/WPsalty/d" a "$WPSalts" . w | ed -s /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "$WPSalts" >> /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "require_once(ABSPATH . 'wp-settings.php');" >> /var/www/"$domain"/html/wp-config.php
|
||||
|
||||
#PHP Pool
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||
|
||||
1
CoreModules/generic/apt.pkg.list
Normal file
1
CoreModules/generic/apt.pkg.list
Normal file
@@ -0,0 +1 @@
|
||||
cron
|
||||
1
CoreModules/generic/dnf.pkg.list
Normal file
1
CoreModules/generic/dnf.pkg.list
Normal file
@@ -0,0 +1 @@
|
||||
cronie
|
||||
@@ -1 +1 @@
|
||||
htop ufw nload fail2ban
|
||||
htop ufw nload fail2ban sudo bash-completion
|
||||
@@ -30,6 +30,12 @@ timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1
|
||||
sed -i -e '/Port 22/c\Port 4242' -e 's/PermitRootLogin yes/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config > $OUTPUT 2>&1
|
||||
|
||||
|
||||
if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] || [ "$osrel" = "deb10" ] ; then
|
||||
sed -i -e '/XKBLAYOUT=/c\XKBLAYOUT=us' -e '/XKBVARIANT=/c\XKBVARIANT="intl"' /etc/default/keyboard > $OUTPUT 2>&1
|
||||
elif [ "$osrel" = "cent8" ]; then
|
||||
localectl set-keymap us-int
|
||||
fi
|
||||
|
||||
##----------##
|
||||
# Swap #
|
||||
##----------##
|
||||
|
||||
@@ -1,26 +1,37 @@
|
||||
# Getting/using the Normal installer (installer.sh):
|
||||
|
||||
Using curl
|
||||
```
|
||||
#Get installer.sh from the repo and store it at: /tmp/installer.sh
|
||||
curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh
|
||||
bash /tmp/installer.sh
|
||||
```
|
||||
|
||||
Using wget
|
||||
```
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh
|
||||
bash /tmp/installer.sh
|
||||
```
|
||||
# Getting/using the Legacy installer (installer.sh):
|
||||
Using curl
|
||||
```
|
||||
#Get installer.sh from the repo and store it at: /tmp/installer.sh
|
||||
curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh
|
||||
bash /tmp/installer.sh -l 2>&1 | tee ~/output.log
|
||||
```
|
||||
```
|
||||
|
||||
Using wget
|
||||
```
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh
|
||||
bash /tmp/installer.sh -l 2>&1 | tee ~/output.log
|
||||
```
|
||||
# Adding a Domain (AppendCMS.sh):
|
||||
The script wil get most information it need from stored config, only the new domain and the mysql root password need to be entered.
|
||||
|
||||
```
|
||||
#Get the AppendCMS.sh from the repo and store it at: /tmp/AppendCMS.sh
|
||||
bash /tmp/AppendCMS.sh
|
||||
bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendCMS.sh)
|
||||
```
|
||||
|
||||
# Adding a Module/Option (AppendModule.sh):
|
||||
The script wil get most information it need from stored config
|
||||
```
|
||||
#Get the AppendCMS.sh from the repo and store it at: /tmp/AppendModule.sh
|
||||
bash /tmp/AppendModule.sh
|
||||
bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendModule.sh)
|
||||
```
|
||||
@@ -1,7 +1,7 @@
|
||||
site_name: Web-V2
|
||||
theme: slate
|
||||
repo_name: 'Git Repo'
|
||||
repo_url: https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/src/branch/master
|
||||
repo_url: https://git.ictmaatwerk.com/VPS-scripts/Web-V2/src/branch/master
|
||||
nav:
|
||||
- User: 'User-MainInfo.md'
|
||||
- Development:
|
||||
|
||||
22
README.md
22
README.md
@@ -1,29 +1,39 @@
|
||||
# Ubuntu-Web-V2
|
||||
**Get Started with the graphical installer**:
|
||||
# Web-V2
|
||||
## Geting started
|
||||
**Default/Graphical installer**:
|
||||
Using curl
|
||||
```
|
||||
curl https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh
|
||||
curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh
|
||||
bash /tmp/installer.sh
|
||||
```
|
||||
|
||||
Using wget
|
||||
```
|
||||
wget https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh
|
||||
bash /tmp/installer.sh
|
||||
```
|
||||
|
||||
**Legacy Installer for developing and debugging**:
|
||||
Using curl
|
||||
```
|
||||
curl https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh
|
||||
curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh
|
||||
bash /tmp/installer.sh -l 2>&1 | tee ~/output.log
|
||||
```
|
||||
|
||||
Using wget
|
||||
```
|
||||
wget https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh
|
||||
bash /tmp/installer.sh -l 2>&1 | tee ~/output.log
|
||||
```
|
||||
## Adding extra CMS/Site after instalation
|
||||
```
|
||||
bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendCMS.sh)
|
||||
```
|
||||
|
||||
## Adding extra Module after instalation
|
||||
```
|
||||
bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendModule.sh)
|
||||
```
|
||||
|
||||
### This script uses the following repo's as dependencies:
|
||||
```
|
||||
|
||||
@@ -29,18 +29,15 @@ dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||
|
||||
if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
|
||||
echo "Ubuntu 18.04 Detected"
|
||||
PKGM="$APTMODE"
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
shortdist=ubu1804
|
||||
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||
echo "Ubuntu 20.04 Detected"
|
||||
echo "Ubuntu 20.04 is not yet fully tested, not recommended for production server"
|
||||
PKGM="$APTMODE"
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
echo "This OS is not supported"
|
||||
exit
|
||||
shortdist=ubu2004
|
||||
elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||
echo "Debian 10 Detected"
|
||||
@@ -48,8 +45,6 @@ elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
shortdist=deb10
|
||||
echo "This OS is not supported"
|
||||
exit
|
||||
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||
echo "Centos 8 Detected"
|
||||
PKGM="dnf"
|
||||
@@ -67,7 +62,7 @@ unset dist_ver dist APTMODE
|
||||
|
||||
|
||||
#Repo Vars
|
||||
repo=https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2
|
||||
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
|
||||
branch=master
|
||||
branchtype=branch
|
||||
|
||||
|
||||
13
installer.sh
13
installer.sh
@@ -23,7 +23,7 @@ fi
|
||||
##---------------##
|
||||
|
||||
#Git-repo
|
||||
repo=https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2
|
||||
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
|
||||
branch=master
|
||||
branchtype=branch #=branch for branch and =tag for release
|
||||
#Installer-config
|
||||
@@ -37,18 +37,15 @@ dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||
|
||||
if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
|
||||
echo "Ubuntu 18.04 Detected"
|
||||
PKGM="$APTMODE"
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
shortdist=ubu1804
|
||||
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||
echo "Ubuntu 20.04 Detected"
|
||||
echo "Ubuntu 20.04 is not yet fully tested, not recommended for production server"
|
||||
PKGM="$APTMODE"
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
echo "This os in not supported"
|
||||
exit
|
||||
shortdist=ubu2004
|
||||
elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||
echo "Debian 10 Detected"
|
||||
@@ -56,8 +53,6 @@ elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
shortdist=deb10
|
||||
echo "This os in not supported"
|
||||
exit
|
||||
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||
echo "Centos 8 Detected"
|
||||
PKGM="dnf"
|
||||
@@ -284,8 +279,8 @@ while true; do
|
||||
done
|
||||
read -p "Set sitename to ${domain//./_}? (y/n)" choice
|
||||
case "$choice" in
|
||||
y|Y ) sitename=${domain//./_};;
|
||||
n|N ) echo "";
|
||||
y*|Y* ) sitename=${domain//./_};;
|
||||
n*|N* ) echo "";
|
||||
while true; do
|
||||
echo "Please enter sitename, Must NOT contain special characters, except: _";read sitename
|
||||
if [[ $sitename == *['!'@#\$%^\&*()+,.]* ]] || [ -z "$sitename" ]
|
||||
|
||||
Reference in New Issue
Block a user