remove all variable and function sourcing from bin srcipts

This commit is contained in:
Valentin 2024-05-03 22:21:29 +02:00
parent 40400f928d
commit 28e3d13cd1
15 changed files with 1 additions and 41 deletions

View File

@ -22,7 +22,7 @@ On a fresh install as root user using
`git clone https://gitea.valentin-le-moign.fr/val/deployment_dcdn_static`
`cd deployment-dcdn_static`
`cd deployment_dcdn_static`
`chmod u+x install.sh`

View File

@ -1,7 +1,5 @@
#!/bin/bash
. bin/variables.sh
echo -e "${PURPLE}${BOLD}Create user${RESET}"
read -p "Enter username: " username

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
get_ssh_port
get_username
get_ip

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
get_username
get_ip
get_ssh_port

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
if systemctl is-enabled apache2 >/dev/null 2>&1; then
systemctl disable --now apache2
fi

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
install_pkg tmux
if [[ -z "$DB_DIRECTUS_PASSWORD" ]]; then

View File

@ -3,9 +3,6 @@
# Automate mysql secure installation for debian-based systems
# https://gist.github.com/coderua/5592d95970038944d099
. bin/variables.sh
. bin/functions.sh
install_pkg mariadb-server
echo -e "${ORANGE}${BOLD}Generate and store the password somewhere safe${RESET}"
echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}"

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
touch /var/www/.bashrc
mkdir -p /var/www/.nvm
mkdir /var/www/.npm

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
get_ip
echo -e "${PURPLE}${BOLD}Create and push a prod branch on the repo${RESET}"

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
echo -e "${PURPLE}${BOLD}Enter the domain name of the website${RESET}"
read DOMAIN_NAME
get_ip

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
echo -e "${ORANGE}${BOLD}Generate and store the credentials somewhere safe${RESET}"
echo -e "${PURPLE}${BOLD}Enter the Directus admin email : ${RESET}"
read directus_admin_email

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
if ! dpkg -s mariadb-server >/dev/null 2>&1; then
. bin/install_mariadb.sh
fi

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
echo -e "${PURPLE}${BOLD}Setup Firewall and Fail2ban${RESET}"
install_pkg ufw
install_pkg fail2ban

View File

@ -1,7 +1,5 @@
#!/bin/bash
. bin/variables.sh
echo -e "${PURPLE}${BOLD}Setup SSH${RESET}"
ssh_port=$((RANDOM % (65536 - 1024 + 1) + 1024))

View File

@ -1,8 +1,5 @@
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
echo -e "${PURPLE}${BOLD}If it does not already exists, create a webhook at the following url${RESET}"
echo -e "${PURPLE}${BOLD}${repo_url}/settings/hooks/gitea/new${RESET}"
echo -e "${BLUE}${BOLD}Target URL ${RESET}${BLUE}https://${domain_name}/webhook.php${RESET}"