diff --git a/hest_inst_1.sh b/hest_inst_1.sh new file mode 100644 index 0000000..525c2fa --- /dev/null +++ b/hest_inst_1.sh @@ -0,0 +1,40 @@ +#!/usr/bin/sh + +ColorRed='\033[0;31m' +ColorGreen='\033[0;32m' +ColorOff='\033[0m' + +# Function to display the confirmation prompt +function confirm() { + while true; do + read -p "$1? (y/n) " yn + case $yn in + [Yy]* ) return 0;; + [Nn]* ) return 1;; + esac + done +} + +clear + +# check if running as root in a bash script +# https://stackoverflow.com/a/28776100 +if [ `id -u` -ne 0 ] + then echo Please run this script as root or using sudo! + exit +fi + +echo -e "${ColorGreen}Введите HOSTNAME (пример: www.default.com):${ColorOff}" +read HOSTNAME +echo -e "${ColorGreen}Введите USERNAME:${ColorOff}" +read USERNAME +echo -e "${ColorGreen}Введите PASSWORD:${ColorOff}" +read PASSWORD +echo -e "${ColorGreen}Введите EMAIL:${ColorOff}" +read EMAIL + +# *** HESTIACP 1.9.3 *** +# sudo su - +gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://185.125.188.26 --recv-keys A189E93654F0B0E5 +wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh +bash hst-install.sh --lang 'ru' --hostname '$HOSTNAME' --username '$USERNAME' --email '$EMAIL' --password '$PASSWORD' --multiphp '8.2' --postgresql yes --dovecot no --clamav no --spamassassin no