Commit a74efc87 authored by w4t's avatar w4t

wtserver 0.58

parent d7784b3f
......@@ -4,7 +4,7 @@
#---------------------------------------------------------------------
InstallGitlabCE() {
echo -n "Installed Gitlab-ce packages... "
echo -n "$IDENTATION_LVL_1 Installed Gitlab-ce packages... "
apt_install curl openssh-server ca-certificates postfix apt-transport-https gnupg2 software-properties-common tzdata perl
......@@ -12,7 +12,7 @@ InstallGitlabCE() {
#curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
#apt_install gitlab-ce
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash > /dev/null
apt_install gitlab-ee
#external_url 'https://Your_Domain_Name' /etc/gitlab/gitlab.rb
......@@ -234,10 +234,10 @@ EOF
#ssl cert generated
systemctl stop nginx
if [ "$CFG_SSL_NEW" == "yes" ]; then
sh /root/.acme.sh/acme.sh --issue --standalone -d gitlab.$CFG_HOSTNAME_DOMAIN --force
sh /root/.acme.sh/acme.sh --issue --standalone -d gitlab.$CFG_HOSTNAME_DOMAIN --force >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
else
#cp -av /home/administrator/wtlinux_server_setup/acme_ssl/arbajnok/gitlab.$CFG_HOSTNAME_DOMAIN /home/administrator/.acme.sh/
cp -av /home/$SUDO_USER/wtlinux_server_setup/acme_ssl/$CFG_HOSTNAME_DOMAIN/gitlab.$CFG_HOSTNAME_DOMAIN /root/.acme.sh/
cp -av /home/$SUDO_USER/wtlinux_server_setup/acme_ssl/$CFG_HOSTNAME_DOMAIN/gitlab.$CFG_HOSTNAME_DOMAIN /root/.acme.sh/ >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
fi
systemctl restart nginx
......@@ -249,5 +249,5 @@ Gitlab mysql root password : $CFG_GITLAB_ADMIN_PWD
#----------------------------
EOF
echo -e "[${green}DONE${NC}]\n"
echo -e "[${green}DONE${NC}]"
}
......@@ -4,7 +4,7 @@
#---------------------------------------------------------------------
InstallISPConfig() {
local START_TIME=$SECONDS
echo -n -e "$IDENTATION_LVL_0 ${BWhite}Installing ISPConfig${NC}"
echo -e "$IDENTATION_LVL_0 ${BWhite}Installing ISPConfig${NC}"
if [ "$CFG_ISPCVERSION" == "Git stable" ]; then
echo -n -e "$IDENTATION_LVL_1 Downloading Latest ISPConfig Git Stable (3.2 branch)... "
......@@ -14,7 +14,6 @@ InstallISPConfig() {
else
echo -n -e "$IDENTATION_LVL_1 Download Latest ISPConfig git... "
wget -q -O $PROGRAMS_INSTALL_DOWNLOAD/ISPConfig-develop-git.tar.gz https://git.ispconfig.org/ispconfig/ispconfig3/-/archive/develop/ispconfig3-develop.tar.gz >>$PROGRAMS_INSTALL_LOG_FILES 2>&1
EXTRACTED_DIR="ispconfig3-develop"
echo -e "[${green}DONE${NC}]"
fi
......@@ -22,7 +21,7 @@ InstallISPConfig() {
echo -n -e "$IDENTATION_LVL_1 Extracting the downloaded package... "
cd $PROGRAMS_INSTALL_DOWNLOAD
tar xfz $PROGRAMS_INSTALL_DOWNLOAD/ISPConfig-*.tar.gz >>$PROGRAMS_INSTALL_LOG_FILES 2>&1
AUTO_INSTALL_INI_LOCATION=$PROGRAMS_INSTALL_DOWNLOAD/$EXTRACTED_DIR/install
AUTO_INSTALL_INI_LOCATION=$PROGRAMS_INSTALL_DOWNLOAD/ispconfig3-install/install
cd $AUTO_INSTALL_INI_LOCATION
echo -e "[${green}DONE${NC}]"
......@@ -101,7 +100,7 @@ EOF
# Log ISPConfig configuration
echo -e "$IDENTATION_LVL_1 Logging ISPConfig configuration..."
cat >> /home/administrator/wtlinux_server_setup/wtserver_configuration.txt <<EOF
cat >> /home/$SUDO_USER/wtlinux_server_setup/wtserver_configuration.txt <<EOF
# Ispconfig3 config
#------------------------------
Ispconfig3 Admin : admin
......@@ -116,13 +115,13 @@ EOF
systemctl stop nginx
if [ "$CFG_SSL_NEW" == "yes" ]; then
sh /root/.acme.sh/acme.sh --issue --standalone -d server1.$CFG_HOSTNAME_DOMAIN --force
sh /root/.acme.sh/acme.sh --issue --standalone -d server1.$CFG_HOSTNAME_DOMAIN --force >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
else
cp -av /home/administrator/wtlinux_server_setup/acme_ssl/$CFG_HOSTNAME_DOMAIN/server1.$CFG_HOSTNAME_DOMAIN /root/.acme.sh/
cp -av /home/$SUDO_USER/wtlinux_server_setup/acme_ssl/$CFG_HOSTNAME_DOMAIN/server1.$CFG_HOSTNAME_DOMAIN /home/$SUDO_USER/.acme.sh/ >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
fi
ln -sf /root/.acme.sh/server1.$CFG_HOSTNAME_DOMAIN/server1.$CFG_HOSTNAME_DOMAIN.cer /usr/local/ispconfig/interface/ssl/ispserver.crt
ln -sf /root/.acme.sh/server1.$CFG_HOSTNAME_DOMAIN/server1.$CFG_HOSTNAME_DOMAIN.key /usr/local/ispconfig/interface/ssl/ispserver.key
ln -sf /home/$SUDO_USER/.acme.sh/server1.$CFG_HOSTNAME_DOMAIN/server1.$CFG_HOSTNAME_DOMAIN.cer /usr/local/ispconfig/interface/ssl/ispserver.crt
ln -sf /home/$SUDO_USER/.acme.sh/server1.$CFG_HOSTNAME_DOMAIN/server1.$CFG_HOSTNAME_DOMAIN.key /usr/local/ispconfig/interface/ssl/ispserver.key
if [ $CFG_SETUP_WEB == "yes" ]; then
if [ "$CFG_WEBSERVER" == "nginx" ]; then
......
......@@ -53,7 +53,7 @@ InstallLetsEncrypt() {
chown -R "$SUDO_USER:$SUDO_USER" "$USER_HOME/.acme.sh"
echo -e "[${green}DONE${NC}]"
else
echo -e "$IDENTATION_LVL_2 .acme.sh already exists in $USER_NAME's home directory. [${yellow}SKIPPED${NC}]"
echo -e "$IDENTATION_LVL_2 .acme.sh already exists in $USER_NAME's home directory. [${orange}SKIPPED${NC}]"
fi
# Create alias for acme.sh
......
......@@ -23,7 +23,7 @@ red='\033[0;31m'
green='\033[0;32m'
BBlack='\033[1;90m'
BWhite='\033[1;97m'
yellow='\e[0;33m'
orange='\e[0;33m'
bold='\e[1m'
underlined='\e[4m'
NC='\033[0m' # No Color
......@@ -116,15 +116,15 @@ RE1='^.{4,253}$'
RE2='^([[:alnum:]][[:alnum:]\-]{0,61}[[:alnum:]]\.)+[a-zA-Z]{2,63}$'
if [[ $CFG_HOSTNAME_FQDN =~ $RE ]]; then
echo "The hostname is: $CFG_HOSTNAME_FQDN."
echo -e "${yellow}Warning: Hostname cannot be *.localdomain.${NC}\n"
echo -e "${orange}Warning: Hostname cannot be *.localdomain.${NC}\n"
elif ! [[ $CFG_HOSTNAME_FQDN =~ $RE1 && $CFG_HOSTNAME_FQDN =~ $RE2 ]]; then
echo "The hostname is: $CFG_HOSTNAME_FQDN."
echo -e "${yellow}Warning: Hostname is not a valid fully qualified domain name (FQDN).${NC}\n"
echo -e "${orange}Warning: Hostname is not a valid fully qualified domain name (FQDN).${NC}\n"
fi
if [[ $CFG_HOSTNAME_FQDN =~ $RE ]] || ! [[ $CFG_HOSTNAME_FQDN =~ $RE1 && $CFG_HOSTNAME_FQDN =~ $RE2 ]]; then
echo "The IP address is: ${IP_ADDRESS[0]}."
# Source: https://www.faqforge.com/linux/which-ports-are-used-on-a-ispconfig-3-server-and-shall-be-open-in-the-firewall/
echo -e "${yellow}Warning: If this system is connected to a router and/or behind a NAT, please be sure that the private (internal) IP address is static before continuing.${NC} For routers, static internal IP addresses are usually assigned via DHCP reservation. See your routers user guide for more info… You will also need to forward some ports depending on what software you choose to install:\n\tTCP Ports\n\t\t20\t- FTP\n\t\t21\t- FTP\n\t\t22\t- SSH/SFTP\n\t\t25\t- Mail (SMTP)\n\t\t53\t- DNS\n\t\t80\t- Web (HTTP)\n\t\t110\t- Mail (POP3)\n\t\t143\t- Mail (IMAP)\n\t\t443\t- Web (HTTPS)\n\t\t465\t- Mail (SMTPS)\n\t\t587\t- Mail (SMTP)\n\t\t993\t- Mail (IMAPS)\n\t\t995\t- Mail (POP3S)\n\t\t3306\t- Database\n\t\t5222\t- Chat (XMPP)\n\t\t8080\t- ISPConfig\n\t\t8081\t- ISPConfig\n\t\t10000\t- ISPConfig\n\n\tUDP Ports\n\t\t53\t- DNS\n\t\t3306\t- Database\n" | fold -s -w "$COLUMNS"
echo -e "${orange}Warning: If this system is connected to a router and/or behind a NAT, please be sure that the private (internal) IP address is static before continuing.${NC} For routers, static internal IP addresses are usually assigned via DHCP reservation. See your routers user guide for more info… You will also need to forward some ports depending on what software you choose to install:\n\tTCP Ports\n\t\t20\t- FTP\n\t\t21\t- FTP\n\t\t22\t- SSH/SFTP\n\t\t25\t- Mail (SMTP)\n\t\t53\t- DNS\n\t\t80\t- Web (HTTP)\n\t\t110\t- Mail (POP3)\n\t\t143\t- Mail (IMAP)\n\t\t443\t- Web (HTTPS)\n\t\t465\t- Mail (SMTPS)\n\t\t587\t- Mail (SMTP)\n\t\t993\t- Mail (IMAPS)\n\t\t995\t- Mail (POP3S)\n\t\t3306\t- Database\n\t\t5222\t- Chat (XMPP)\n\t\t8080\t- ISPConfig\n\t\t8081\t- ISPConfig\n\t\t10000\t- ISPConfig\n\n\tUDP Ports\n\t\t53\t- DNS\n\t\t3306\t- Database\n" | fold -s -w "$COLUMNS"
# read -p "Would you like to update the hostname for this system? (recommended) (y/n) " -n 1 -r
echo -n "Would you like to update the hostname for this system? (recommended) (y/n) "
read -n 1 -r
......@@ -256,7 +256,7 @@ if VM=$(systemd-detect-virt -v); then
echo -e "Virtual Machine (VM) hypervisor:\t$VM\n"
fi
if uname -r | grep -iq "microsoft"; then
echo -e "${yellow}Warning: The Windows Subsystem for Linux (WSL) is not yet fully supported by this script.${NC}"
echo -e "${orange}Warning: The Windows Subsystem for Linux (WSL) is not yet fully supported by this script.${NC}"
echo -e "For more information, see this issue: https://github.com/servisys/ispconfig_setup/issues/176\n"
fi
if [ -n "$DISTRO" ]; then
......@@ -385,8 +385,8 @@ if [ -f /etc/debian_version ]; then
echo -e "\n${green}Well done! ISPConfig installed and configured correctly :D${NC} 😃"
echo -e "\nNow you can access to your ISPConfig installation at: ${underlined}https://$CFG_HOSTNAME_FQDN:$CFG_ISPONCFIG_PORT${NC} or ${underlined}https://${IP_ADDRESS[0]}:$CFG_ISPONCFIG_PORT${NC}"
echo -e "The default ISPConfig Username is: ${bold}admin${NC}\n\t and the Password is: ${bold}$CFG_ISPONCFIG_ADMIN_PASS${NC}"
echo -e "${yellow}Warning: This is a security risk. Please change the default password after your first login.${NC}"
echo -e "The ISPConfig Username is: ${bold}admin${NC}\n\t and the Password is: ${bold}$CFG_ISPONCFIG_ADMIN_PASS${NC}"
#echo -e "${orange}Warning: This is a security risk. Please change the default password after your first login.${NC}"
#echo "plese run manual certbot and service nginx restart"
#echo "sudo su"
#echo "certbot certonly --agree-tos --non-interactive --renew-by-default --standalone --email wolftronics@wolftronics.hu -d server1.wolftronics.hu"
......@@ -463,7 +463,7 @@ elif [ -f /etc/redhat-release ]; then # /etc/centos-release
echo -e "\n${green}Well done! ISPConfig installed and configured correctly :D${NC} 😃"
echo -e "\nNow you can access to your ISPConfig installation at: ${underlined}https://$CFG_HOSTNAME_FQDN:$CFG_ISPONCFIG_PORT${NC} or ${underlined}https://${IP_ADDRESS[0]}:$CFG_ISPONCFIG_PORT${NC}"
echo -e "The default ISPConfig Username is: ${bold}admin${NC}\n\t and the Password is: ${bold}$CFG_ISPONCFIG_ADMIN_PASS${NC}"
echo -e "${yellow}Warning: This is a security risk. Please change the default password after your first login.${NC}"
echo -e "${orange}Warning: This is a security risk. Please change the default password after your first login.${NC}"
echo -e "\n${red}If you setup Roundcube webmail go to: http://$CFG_HOSTNAME_FQDN/roundcubemail/installer and configure db connection${NC}"
echo -e "${red}After that disable access to installer in /etc/httpd/conf.d/roundcubemail.conf${NC}"
elif [ -f /etc/SuSE-release ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment