combind both scripts

This commit is contained in:
ZennDev1337 2024-06-25 08:44:41 +02:00
parent a3a292f134
commit 5ec8d97dcf
2 changed files with 15 additions and 1 deletions

View file

@ -10,7 +10,6 @@ Bash script to install Elastic Stack on Debian and Ubuntu.
## Set permission
```
chmod +x elastic-pre.sh
chmod +x easyELKnginx.sh
```

View file

@ -20,6 +20,20 @@ if [ "$USER_ID" > 0 ]; then
exit 1
fi
################### INSTALL PREREQUISITIES #####################
install_prerequisities(){
printf "\033[32m Installing packages from prerequisities\033[0m\n"
echo "-----------------------------------------------------"
apt -y update
apt -y install default-jre curl jq
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
apt -y install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
apt -y update
apt -y install elasticsearch
}
#Update system packages
update_system_packages() {
printf "\033[32m Updating packages and install dependencies\033[0m\n"
@ -223,6 +237,7 @@ fi
}
check_user
install_prerequisities
update_system_packages
check_nginx
check_java