remove all variable and function sourcing from bin srcipts
This commit is contained in:
parent
40400f928d
commit
28e3d13cd1
|
|
@ -22,7 +22,7 @@ On a fresh install as root user using
|
||||||
|
|
||||||
`git clone https://gitea.valentin-le-moign.fr/val/deployment_dcdn_static`
|
`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`
|
`chmod u+x install.sh`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Create user${RESET}"
|
echo -e "${PURPLE}${BOLD}Create user${RESET}"
|
||||||
|
|
||||||
read -p "Enter username: " username
|
read -p "Enter username: " username
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
get_ssh_port
|
get_ssh_port
|
||||||
get_username
|
get_username
|
||||||
get_ip
|
get_ip
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
get_username
|
get_username
|
||||||
get_ip
|
get_ip
|
||||||
get_ssh_port
|
get_ssh_port
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
if systemctl is-enabled apache2 >/dev/null 2>&1; then
|
if systemctl is-enabled apache2 >/dev/null 2>&1; then
|
||||||
systemctl disable --now apache2
|
systemctl disable --now apache2
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
install_pkg tmux
|
install_pkg tmux
|
||||||
|
|
||||||
if [[ -z "$DB_DIRECTUS_PASSWORD" ]]; then
|
if [[ -z "$DB_DIRECTUS_PASSWORD" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@
|
||||||
# Automate mysql secure installation for debian-based systems
|
# Automate mysql secure installation for debian-based systems
|
||||||
# https://gist.github.com/coderua/5592d95970038944d099
|
# https://gist.github.com/coderua/5592d95970038944d099
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
install_pkg mariadb-server
|
install_pkg mariadb-server
|
||||||
echo -e "${ORANGE}${BOLD}Generate and store the password somewhere safe${RESET}"
|
echo -e "${ORANGE}${BOLD}Generate and store the password somewhere safe${RESET}"
|
||||||
echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}"
|
echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
touch /var/www/.bashrc
|
touch /var/www/.bashrc
|
||||||
mkdir -p /var/www/.nvm
|
mkdir -p /var/www/.nvm
|
||||||
mkdir /var/www/.npm
|
mkdir /var/www/.npm
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
get_ip
|
get_ip
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Create and push a prod branch on the repo${RESET}"
|
echo -e "${PURPLE}${BOLD}Create and push a prod branch on the repo${RESET}"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Enter the domain name of the website${RESET}"
|
echo -e "${PURPLE}${BOLD}Enter the domain name of the website${RESET}"
|
||||||
read DOMAIN_NAME
|
read DOMAIN_NAME
|
||||||
get_ip
|
get_ip
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
echo -e "${ORANGE}${BOLD}Generate and store the credentials somewhere safe${RESET}"
|
echo -e "${ORANGE}${BOLD}Generate and store the credentials somewhere safe${RESET}"
|
||||||
echo -e "${PURPLE}${BOLD}Enter the Directus admin email : ${RESET}"
|
echo -e "${PURPLE}${BOLD}Enter the Directus admin email : ${RESET}"
|
||||||
read directus_admin_email
|
read directus_admin_email
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
if ! dpkg -s mariadb-server >/dev/null 2>&1; then
|
if ! dpkg -s mariadb-server >/dev/null 2>&1; then
|
||||||
. bin/install_mariadb.sh
|
. bin/install_mariadb.sh
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
. bin/functions.sh
|
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Setup Firewall and Fail2ban${RESET}"
|
echo -e "${PURPLE}${BOLD}Setup Firewall and Fail2ban${RESET}"
|
||||||
install_pkg ufw
|
install_pkg ufw
|
||||||
install_pkg fail2ban
|
install_pkg fail2ban
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bin/variables.sh
|
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Setup SSH${RESET}"
|
echo -e "${PURPLE}${BOLD}Setup SSH${RESET}"
|
||||||
|
|
||||||
ssh_port=$((RANDOM % (65536 - 1024 + 1) + 1024))
|
ssh_port=$((RANDOM % (65536 - 1024 + 1) + 1024))
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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}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 "${PURPLE}${BOLD}${repo_url}/settings/hooks/gitea/new${RESET}"
|
||||||
echo -e "${BLUE}${BOLD}Target URL ${RESET}${BLUE}https://${domain_name}/webhook.php${RESET}"
|
echo -e "${BLUE}${BOLD}Target URL ${RESET}${BLUE}https://${domain_name}/webhook.php${RESET}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue