<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Sentora Support Forums - General Discussions (Non-Support Related)]]></title>
		<link>https://forums.sentora.org/</link>
		<description><![CDATA[Sentora Support Forums - https://forums.sentora.org]]></description>
		<pubDate>Mon, 20 Apr 2026 18:10:42 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[2.1.0 on riscv architecture]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=13113</link>
			<pubDate>Sun, 02 Feb 2025 09:47:17 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=23083">eclipsah</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=13113</guid>
			<description><![CDATA[I managed to install 2.1.0 on Bianbu 2.0.4/riscv64, which is actually an Ubuntu 24.04 fork for Spacemit k1 riscv64 cpu running on a BananaPi BPI-F3.<br />
<br />
I'm posting the install script that I modified to install.<br />
<br />
Everything works fine, with the only quirks around the Sencrypt SSL module, where nothing happens when trying to create or manage a certificate.<br />
<br />
When I'll have time i'm going to make it work on arm64 arch with some Debian/Ubuntu derivate.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/usr/bin/env bash<br />
<br />
# Official Sentora Automated Installation Script -- riscv64/bianbu experimental<br />
# =============================================<br />
#<br />
#  This program is free software: you can redistribute it and/or modify<br />
#  it under the terms of the GNU General Public License as published by<br />
#  the Free Software Foundation, either version 3 of the License, or<br />
#  (at your option) any later version.<br />
#<br />
#  This program is distributed in the hope that it will be useful,<br />
#  but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br />
#  GNU General Public License for more details.<br />
#<br />
#  You should have received a copy of the GNU General Public License<br />
#  along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.<br />
#<br />
# Supported Operating Systems: <br />
# Ubuntu server 24.04 <br />
# Debian 12.*<br />
# 32bit and 64bit<br />
#<br />
# Contributions from:<br />
#<br />
# &nbsp;&nbsp;Anthony DeBeaulieu (anthony.d@sentora.org)<br />
# &nbsp;&nbsp;TGagtes <br />
# &nbsp;&nbsp;Pascal Peyremorte (ppeyremorte@sentora.org)<br />
# &nbsp;&nbsp;Mehdi Blagui<br />
# &nbsp;&nbsp;Kevin Andrews (kevin@zvps.uk)<br />
#<br />
# &nbsp;&nbsp;and all those who participated to this and to previous installers.<br />
# &nbsp;&nbsp;Thanks to all.<br />
<br />
## <br />
# SENTORA_CORE/INSTALLER_VERSION<br />
# master - latest unstable<br />
# 2.1.0 - example stable tag<br />
##<br />
<br />
SENTORA_INSTALLER_VERSION="master"<br />
SENTORA_CORE_VERSION="master"<br />
<br />
PANEL_PATH="/etc/sentora"<br />
PANEL_DATA="/var/sentora"<br />
PANEL_CONF="/etc/sentora/configs"<br />
PANEL_UPGRADE=false<br />
<br />
#--- Display the 'welcome' splash/user warning info..<br />
echo ""<br />
echo "############################################################"<br />
echo "#  Welcome to the Official Sentora Installer v.&#36;SENTORA_INSTALLER_VERSION  #"<br />
echo "############################################################"<br />
<br />
echo -e "&#92;nChecking that minimal requirements are ok"<br />
<br />
# Ensure the OS is compatible with the launcher<br />
# leave CentOS code..<br />
if [ -f /etc/centos-release ]; then<br />
    OS="CentOs"<br />
    VERFULL=&#36;(sed 's/^.*release //;s/ (Fin.*&#36;//' /etc/centos-release)<br />
    VER=&#36;{VERFULL:0:1} # return 8<br />
elif [ -f /etc/lsb-release ]; then<br />
    OS=&#36;(grep DISTRIB_ID /etc/lsb-release | sed 's/^.*=//')<br />
    VER=&#36;(grep DISTRIB_RELEASE /etc/lsb-release | sed 's/^.*=//')<br />
elif [ -f /etc/os-release ]; then<br />
    OS=&#36;(grep -w ID /etc/os-release | sed 's/^.*=//')<br />
    VER=&#36;(grep VERSION_ID /etc/os-release | sed 's/^.*"&#92;(.*&#92;)"/&#92;1/')<br />
 else<br />
    OS=&#36;(uname -s)<br />
    VER=&#36;(uname -r)<br />
fi<br />
ARCH=&#36;(uname -m)<br />
<br />
echo "Detected : &#36;OS  &#36;VER  &#36;ARCH"<br />
<br />
if [[ "&#36;OS" = "Bianbu" &amp;&amp; ( "&#36;VER" = "2.0.4" ) ]] ; then<br />
    echo "Ok."<br />
else<br />
    echo "Sorry, this OS is not supported by Sentora." <br />
    exit 1<br />
fi<br />
<br />
# Centos uses repo directory that depends of architecture. Ensure it is compatible<br />
# leave CentOS code..<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#if" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#if</a>
</form> 
         [[ "&#36;OS" = "CentOs" ]] ; then<br />
#    if [[ "&#36;ARCH" == "i386" || "&#36;ARCH" == "i486" || "&#36;ARCH" == "i586" || "&#36;ARCH" == "i686" ]]; then<br />
#        ARCH="i386"<br />
#    elif [[ "&#36;ARCH" != "x86_64" ]]; then<br />
#        echo "Unexpected architecture name was returned (&#36;ARCH ). :-("<br />
#        echo "The installer have been designed for i[3-6]8- and x86_64' architectures. If you"<br />
#        echo " think it may work on your, please report it to the Sentora forum or bugtracker."<br />
#        exit 1<br />
#    fi<br />
#fi<br />
<br />
# Check if the user is 'root' before allowing installation to commence<br />
if [ &#36;UID -ne 0 ]; then<br />
    echo "Install failed: you must be logged in as 'root' to install."<br />
    echo "Use command 'sudo -i', then enter root password and then try again."<br />
    exit 1<br />
fi<br />
<br />
# Check for some common control panels that we know will affect the installation/operating of Sentora.<br />
if [ -e /usr/local/cpanel ] || [ -e /usr/local/directadmin ] || [ -e /usr/local/solusvm/www ] || [ -e /usr/local/home/admispconfig ] || [ -e /usr/local/lxlabs/kloxo ] ; then<br />
    echo "It appears that a control panel is already installed on your server; This installer"<br />
    echo "is designed to install and configure Sentora on a clean OS installation only."<br />
    echo -e "&#92;nPlease re-install your OS before attempting to install using this script."<br />
    exit 1<br />
fi<br />
<br />
# Check for some common packages that we know will affect the installation/operating of Sentora.<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_INSTALLER="apt-get -yqq install"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_REMOVER="apt-get -yqq remove"<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inst() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;dpkg -l "&#36;1" 2&gt; /dev/null | grep '^ii' &amp;&gt; /dev/null<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DB_PCKG="mariadb-server" # changed to mariadb 10.x, as repo has mysql 8<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP_PCKG="apache2"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PHP_PCKG="apache2-mod-php8"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BIND_PCKG="bind9"<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;elif [[ "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_INSTALLER="apt-get -yqq install"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_REMOVER="apt-get -yqq remove"<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inst() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;dpkg -l "&#36;1" 2&gt; /dev/null | grep '^ii' &amp;&gt; /dev/null<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DB_PCKG="default-mysql-server"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP_PCKG="apache2"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PHP_PCKG="apache2-mod-php8"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BIND_PCKG="bind9"<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
  <br />
# Note : Postfix is installed by default on centos netinstall / minimum install.<br />
# The installer seems to work fine even if Postfix is already installed.<br />
# -&gt; The check of postfix is removed, but this comment remains to remember<br />
# only check for sentora installed systems zpanel can now upgrade using this script<br />
if [ -L "/etc/zpanel" ] &amp;&amp; [ -d "/etc/zpanel"  ]; then<br />
    pkginst="n"<br />
    pkginstlist=""<br />
    for package in "&#36;DB_PCKG" "dovecot-mysql" "&#36;HTTP_PCKG" "&#36;PHP_PCKG" "proftpd" "&#36;BIND_PCKG" ; do<br />
        if (inst "&#36;package"); then<br />
            pkginst="y" # At least one package is installed<br />
            pkginstlist="&#36;package &#36;pkginstlist"<br />
        fi<br />
    done<br />
    if [ &#36;pkginst = "y" ]; then<br />
        echo "It appears that the folowing package(s) are already installed:"<br />
        echo "&#36;pkginstlist"<br />
        echo "This installer is designed to install and configure Sentora on a clean OS installation only!"<br />
        echo -e "&#92;nPlease re-install your OS before attempting to install using this script."<br />
        exit 1<br />
    fi<br />
    unset pkginst<br />
    unset pkginstlist<br />
fi<br />
<br />
# *************************************************<br />
#--- Prepare or query informations required to install<br />
<br />
# Update repositories and Install wget and util used to grab server IP<br />
echo -e "&#92;n-- Installing wget and dns utils required to manage inputs"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    apt-get -yqq update &nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#ensure" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#ensure</a>
</form> 
         we can install<br />
    &#36;PACKAGE_INSTALLER dnsutils<br />
fi<br />
&#36;PACKAGE_INSTALLER wget <br />
<br />
extern_ip="&#36;(wget -qO- http://api.sentora.org/ip.txt)"<br />
#local_ip=&#36;(ifconfig eth0 | sed -En 's|.*inet [^0-9]*(([0-9]*&#92;.){3}[0-9]*).*&#36;|&#92;1|p')<br />
local_ip=&#36;(ip addr show | awk '&#36;1 == "inet" &amp;&amp; &#36;3 == "brd" { sub (/&#92;/.*/,""); print &#36;2 }')<br />
<br />
# Enable parameters to be entered on commandline, required for vagrant install<br />
# &nbsp;&nbsp;-d &lt;panel-domain&gt;<br />
# &nbsp;&nbsp;-i &lt;server-ip&gt; (or -i local or -i public, see below)<br />
# &nbsp;&nbsp;-t &lt;timezone-string&gt;<br />
# like :<br />
# &nbsp;&nbsp;sentora_install.sh -t Europe/Paris -d panel.domain.tld -i xxx.xxx.xxx.xxx<br />
# notes:<br />
# &nbsp;&nbsp;-d and -i must be both present or both absent<br />
# &nbsp;&nbsp;-i local  force use of local detected ip<br />
# &nbsp;&nbsp;-i public  force use of public detected ip<br />
# &nbsp;&nbsp;if -t is used without -d/-i, timezone is set from value given and not asked to user<br />
# &nbsp;&nbsp;if -t absent and -d/-i are present, timezone is not set at all<br />
<br />
while getopts d:i:t: opt; do<br />
  case &#36;opt in<br />
  d)<br />
      PANEL_FQDN=&#36;OPTARG<br />
      INSTALL="auto"<br />
      ;;<br />
  i)<br />
      PUBLIC_IP=&#36;OPTARG<br />
      if [[ "&#36;PUBLIC_IP" == "local" ]] ; then<br />
          PUBLIC_IP=&#36;local_ip<br />
      elif [[ "&#36;PUBLIC_IP" == "public" ]] ; then<br />
          PUBLIC_IP=&#36;extern_ip<br />
      fi<br />
      ;;<br />
  t)<br />
      echo "&#36;OPTARG" &gt; /etc/timezone<br />
      tz=&#36;(cat /etc/timezone)<br />
      ;;<br />
  esac<br />
done<br />
if [[ ("&#36;PANEL_FQDN" != "" &amp;&amp; "&#36;PUBLIC_IP" == "") || <br />
      ("&#36;PANEL_FQDN" == "" &amp;&amp; "&#36;PUBLIC_IP" != "") ]] ; then<br />
    echo "-d and -i must be both present or both absent."<br />
    exit 2<br />
fi<br />
<br />
if [[ "&#36;tz" == "" &amp;&amp; "&#36;PANEL_FQDN" == "" ]] ; then<br />
    # Propose selection list for the time zone<br />
    echo "Preparing to select timezone, please wait a few seconds..."<br />
    &#36;PACKAGE_INSTALLER tzdata<br />
    # setup server timezone<br />
    if [[ "&#36;OS" = "CentOs" ]]; then<br />
        # make tzselect to save TZ in /etc/timezone<br />
        echo "echo &#92;&#36;TZ &gt; /etc/timezone" &gt;&gt; /usr/bin/tzselect<br />
        tzselect<br />
        tz=&#36;(cat /etc/timezone)<br />
    elif [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
        dpkg-reconfigure tzdata<br />
        tz=&#36;(cat /etc/timezone)<br />
    fi<br />
fi<br />
# clear timezone information to focus user on important notice<br />
clear<br />
<br />
# Installer parameters<br />
if [[ "&#36;PANEL_FQDN" == "" ]] ; then<br />
    echo -e "&#92;n&#92;e[1;33m=== Informations required to build your server ===&#92;e[0m"<br />
    echo 'The installer requires 2 pieces of information:'<br />
    echo ' 1) the sub-domain that you want to use to access Sentora panel,'<br />
    echo ' &nbsp;&nbsp;- do not use your main domain (like domain.com)'<br />
    echo ' &nbsp;&nbsp;- use a sub-domain, e.g panel.domain.com'<br />
    echo ' &nbsp;&nbsp;- or use the server hostname, e.g server1.domain.com'<br />
    echo ' &nbsp;&nbsp;- DNS must already be configured and pointing to the server IP'<br />
    echo '     &nbsp;&nbsp;for this sub-domain'<br />
    echo ' 2) The public IP of the server.'<br />
    echo ''<br />
<br />
    PANEL_FQDN="&#36;(/bin/hostname)"<br />
    PUBLIC_IP=&#36;extern_ip<br />
    while true; do<br />
        echo ""<br />
        read -r -e -p "Enter the sub-domain you want to access Sentora panel: " -i "&#36;PANEL_FQDN" PANEL_FQDN<br />
<br />
        if [[ "&#36;PUBLIC_IP" != "&#36;local_ip" ]]; then<br />
          echo -e "&#92;nThe public IP of the server is &#36;PUBLIC_IP. Its local IP is &#36;local_ip"<br />
          echo "  For a production server, the PUBLIC IP must be used."<br />
        fi  <br />
        read -r -e -p "Enter (or confirm) the public IP for this server: " -i "&#36;PUBLIC_IP" PUBLIC_IP<br />
        echo ""<br />
<br />
        # Checks if the panel domain is a subdomain<br />
        sub=&#36;(echo "&#36;PANEL_FQDN" | sed -n 's|&#92;(.*&#92;)&#92;..*&#92;..*|&#92;1|p')<br />
        if [[ "&#36;sub" == "" ]]; then<br />
            echo -e "&#92;e[1;31mWARNING: &#36;PANEL_FQDN is not a subdomain!&#92;e[0m"<br />
            confirm="true"<br />
        fi<br />
<br />
        # Checks if the panel domain is already assigned in DNS<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Obsolete now using external source for FQDN to IP. <br />
        #dns_panel_ip=&#36;(host "&#36;PANEL_FQDN"|grep address|cut -d" " -f4) // Obsolete for modern VM's due to hostname setup in /etc/hosts<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dns_panel_ip=&#36;(wget -qO- http://api.sentora.org/hostname.txt?domain="&#36;PANEL_FQDN")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
        if [[ "&#36;dns_panel_ip" == "" ]]; then<br />
            echo -e "&#92;e[1;31mWARNING: &#36;PANEL_FQDN is not defined in your DNS!&#92;e[0m"<br />
            echo "  You must add records in your DNS manager (and then wait until propagation is done)."<br />
            echo "  For more information, read the Sentora documentation:"<br />
            echo " &nbsp;&nbsp;- http://docs.sentora.org/index.php?node=7 (Installing Sentora)"<br />
            echo " &nbsp;&nbsp;- http://docs.sentora.org/index.php?node=51 (Installer questions)"<br />
            echo "  If this is a production installation, set the DNS up as soon as possible."<br />
            confirm="true"<br />
        else<br />
            echo -e "&#92;e[1;32mOK&#92;e[0m: DNS successfully resolves &#36;PANEL_FQDN to &#36;dns_panel_ip"<br />
<br />
            # Check if panel domain matches public IP<br />
            if [[ "&#36;dns_panel_ip" != "&#36;PUBLIC_IP" ]]; then<br />
                echo -e -n "&#92;e[1;31mWARNING: &#36;PANEL_FQDN DNS record does not point to &#36;PUBLIC_IP!&#92;e[0m"<br />
                echo "  Sentora will not be reachable from http://&#36;PANEL_FQDN"<br />
            fi<br />
        fi<br />
<br />
                confirm="true"<br />
        if [[ "&#36;PUBLIC_IP" != "&#36;extern_ip" &amp;&amp; "&#36;PUBLIC_IP" != "&#36;local_ip" ]]; then<br />
            echo -e -n "&#92;e[1;31mWARNING: &#36;PUBLIC_IP does not match detected IP !&#92;e[0m"<br />
            echo "  Sentora will not work with this IP..."<br />
                confirm="true"<br />
        fi<br />
      <br />
        echo ""<br />
        # if any warning, ask confirmation to continue or propose to change<br />
        if [[ "&#36;confirm" != "" ]] ; then<br />
            echo "There are some warnings..."<br />
            echo "Are you really sure that you want to setup Sentora with these parameters?"<br />
            read -r -e -p "(y):Accept and install, (n):Change domain or IP, (q):Quit installer? " yn<br />
            case &#36;yn in<br />
                [Yy]* ) break;;<br />
                [Nn]* ) continue;;<br />
                [Qq]* ) exit;;<br />
            esac<br />
        else<br />
            read -r -e -p "All is ok. Do you want to install Sentora now (y/n)? " yn<br />
            case &#36;yn in<br />
                [Yy]* ) break;;<br />
                [Nn]* ) exit;;<br />
            esac<br />
        fi<br />
    done<br />
fi<br />
<br />
# ***************************************<br />
# Installation really starts here<br />
<br />
echo -e "&#92;n# -------------------------------------------------------------------------------"<br />
<br />
#--- Setup Sentora Admin contact info<br />
<br />
echo -e "&#92;n--- Please Enter vaild contact info for the Sentora system admin or owner below:&#92;n"<br />
<br />
# Get Admin contact info <br />
# ---- Name<br />
while true<br />
do<br />
    read -r -e -p "Enter Full name: " -i "&#36;ADMIN_NAME" ADMIN_NAME<br />
    echo<br />
    if [ -n "&#36;ADMIN_NAME" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# --- Email<br />
while true<br />
do<br />
    read -r -e -p "Enter admin email: " -i "&#36;ADMIN_EMAIL" ADMIN_EMAIL<br />
    echo<br />
    if [[ "&#36;ADMIN_EMAIL" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+&#92;.[a-zA-Z]{2,4}&#36; ]]<br />
    then<br />
        break<br />
    else<br />
        echo "Email address &#36;ADMIN_EMAIL is invalid."<br />
    fi<br />
done<br />
<br />
# ---- Phone Number<br />
while true<br />
do<br />
    read -r -e -p "Enter Phone Number: " -i "&#36;ADMIN_PHONE" ADMIN_PHONE<br />
    echo<br />
    if [ -n "&#36;ADMIN_PHONE" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address<br />
while true<br />
do<br />
    read -r -e -p "Enter Street Address: " -i "&#36;ADMIN_ADDRESS" ADMIN_ADDRESS<br />
    echo<br />
    if [ -n "&#36;ADMIN_ADDRESS" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address - City, State or Province<br />
while true<br />
do<br />
    read -r -e -p "Enter City, State or Province: " -i "&#36;ADMIN_PROVINCE" ADMIN_PROVINCE<br />
    echo<br />
    if [ -n "&#36;ADMIN_PROVINCE" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address - Postal code<br />
while true<br />
do<br />
    read -r -e -p "Enter Postal code: " -i "&#36;ADMIN_POSTALCODE" ADMIN_POSTALCODE<br />
    echo<br />
    if [ -n "&#36;ADMIN_POSTALCODE" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address - Country<br />
while true<br />
do<br />
    read -r -e -p "Enter Country: " -i "&#36;ADMIN_COUNTRY" ADMIN_COUNTRY<br />
    echo<br />
    if [ -n "&#36;ADMIN_COUNTRY" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
echo -e "&#92;n# -------------------------------------------------------------------------------&#92;n"<br />
<br />
#--- Set custom logging methods so we create a log file in the current working directory.<br />
logfile=&#36;(date +%Y-%m-%d_%H.%M.%S_sentora_install.log)<br />
touch "&#36;logfile"<br />
exec &gt; &gt;(tee "&#36;logfile")<br />
exec 2&gt;&amp;1<br />
<br />
echo "Installer version &#36;SENTORA_INSTALLER_VERSION"<br />
echo "Sentora core version &#36;SENTORA_CORE_VERSION"<br />
echo ""<br />
echo "Installing Sentora &#36;SENTORA_CORE_VERSION at http://&#36;PANEL_FQDN and ip &#36;PUBLIC_IP"<br />
echo "on server under: &#36;OS  &#36;VER  &#36;ARCH"<br />
uname -a<br />
<br />
# Function to disable a file by appending its name with _disabled<br />
disable_file() {<br />
    mv "&#36;1" "&#36;1_disabled_by_sentora" &amp;&gt; /dev/null<br />
}<br />
<br />
#--- AppArmor must be disabled to avoid problems<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    [ -f /etc/init.d/apparmor ]<br />
    if [ &#36;? = "0" ]; then<br />
        echo -e "&#92;n-- Disabling and removing AppArmor, please wait..."<br />
        /etc/init.d/apparmor stop &amp;&gt; /dev/null<br />
        update-rc.d -f apparmor remove &amp;&gt; /dev/null<br />
        apt-get remove -y --purge apparmor* &amp;&gt; /dev/null<br />
        disable_file /etc/init.d/apparmor &amp;&gt; /dev/null<br />
        echo -e "AppArmor has been removed."<br />
    fi<br />
fi<br />
<br />
#--- Adapt repositories and packages sources<br />
#--- Skip this as it messes up the packages. By default, Bianbu has main, restricted, security and updates enabled<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#echo" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#echo</a>
</form> 
         -e "&#92;n-- Updating repositories and packages sources"<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#if" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#if</a>
</form> 
         [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then <br />
    # Update the enabled Aptitude repositories<br />
#    echo -ne "&#92;nUpdating Aptitude Repos: " &gt;/dev/tty<br />
<br />
#    mkdir -p "/etc/apt/sources.list.d.save"<br />
#    cp -R "/etc/apt/sources.list.d/*" "/etc/apt/sources.list.d.save" &amp;&gt; /dev/null<br />
#    rm -rf "/etc/apt/sources.list/*"<br />
#    cp "/etc/apt/sources.list" "/etc/apt/sources.list.save"<br />
<br />
#    if [[ "&#36;VER" = "2.0.4" ]]; then<br />
#        cat &gt; /etc/apt/sources.list &lt;&lt;EOF<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Depots" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Depots</a>
</form> 
         main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu &#36;(lsb_release -sc) main restricted universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security main restricted universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu &#36;(lsb_release -sc)-updates main restricted universe multiverse<br />
#EOF<br />
#    elif [ "&#36;VER" = "12"  ]; then<br />
#        cat &gt; /etc/apt/sources.list &lt;&lt;EOF<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb http://httpredir.debian.org/debian &#36;(lsb_release -sc) main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb-src http://httpredir.debian.org/debian &#36;(lsb_release -sc) main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb http://httpredir.debian.org/debian &#36;(lsb_release -sc)-updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb-src http://httpredir.debian.org/debian &#36;(lsb_release -sc)-updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://security.debian.org/ &#36;(lsb_release -sc)/updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#deb-src http://security.debian.org/ &#36;(lsb_release -sc)/updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb http://deb.debian.org/debian-security &#36;(lsb_release -sc)-security main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb-src http://deb.debian.org/debian-security &#36;(lsb_release -sc)-security main<br />
#EOF<br />
<br />
 # &nbsp;&nbsp;else<br />
 #     &nbsp;&nbsp;cat &gt; /etc/apt/sources.list &lt;&lt;EOF<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Depots" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Depots</a>
</form> 
         main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates main restricted<br />
 <br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) main restricted<br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates main restricted<br />
#deb-src http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security main restricted<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Depots" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Depots</a>
</form> 
         Universe Multiverse <br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates universe multiverse<br />
<br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) universe multiverse<br />
#deb-src http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security universe multiverse<br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates universe multiverse<br />
#EOF<br />
#    fi<br />
#fi<br />
<br />
#--- List all already installed packages (may help to debug)<br />
echo -e "&#92;n-- Listing of all packages installed:"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    dpkg --get-selections<br />
fi<br />
<br />
#--- Ensures that all packages are up to date<br />
echo -e "&#92;n-- Updating+upgrading system, it may take some time..."<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    apt-get -yqq update<br />
    apt-get -yqq upgrade<br />
fi<br />
<br />
#--- Install utility packages required by the installer and/or Sentora.<br />
echo -e "&#92;n-- Downloading and installing required tools..."<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER sudo vim make zip unzip debconf-utils at build-essential bash-completion ca-certificates e2fslibs<br />
fi<br />
<br />
#--- Download Sentora archive from GitHub<br />
echo -e "&#92;n-- Downloading Sentora, Please wait, this may take several minutes, the installer will continue after this is complete!"<br />
# Get latest sentora<br />
while true; do<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Sentora REPO<br />
    wget -nv -O sentora_core.zip https://github.com/sentora/sentora-core/archive/&#36;SENTORA_CORE_VERSION.zip<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    if [[ -f sentora_core.zip ]]; then<br />
        break;<br />
    else<br />
        echo "Failed to download sentora core from Github"<br />
        echo "If you quit now, you can run again the installer later."<br />
        read -r -e -p "Press r to retry or q to quit the installer? " resp<br />
        case &#36;resp in<br />
            [Rr]* ) continue;;<br />
            [Qq]* ) exit 3;;<br />
        esac<br />
    fi <br />
done<br />
<br />
###<br />
# Sentora Core Install <br />
###<br />
mkdir -p &#36;PANEL_PATH<br />
mkdir -p &#36;PANEL_DATA<br />
chown -R root:root &#36;PANEL_PATH<br />
unzip -oq sentora_core.zip -d &#36;PANEL_PATH<br />
<br />
#<br />
# Remove PHPUnit module test files (coming soon to the code base).<br />
#<br />
rm -rf &#36;PANEL_PATH/panel/modules/*/tests/<br />
rm -rf &#36;PANEL_PATH/composer.json<br />
rm -rf &#36;PANEL_PATH/composer.lock<br />
<br />
###<br />
# ZPanel Upgrade - Clear down all old code (stops orphaned files)<br />
###<br />
if [ ! -L "/etc/zpanel" ] &amp;&amp; [ -d "/etc/zpanel" ]; then<br />
<br />
    echo -e "Upgrading ZPanelCP 10.1.0 to Sentora v.&#36;SENTORA_CORE_VERSION";<br />
<br />
    PANEL_UPGRADE=true<br />
<br />
    mv /etc/zpanel/configs /root/zpanel_configs_backup<br />
<br />
    ## Move main directories to new sentora location ##<br />
    mv /etc/zpanel/* &#36;PANEL_PATH<br />
    mv /var/zpanel/* &#36;PANEL_DATA<br />
<br />
    rm -rf /etc/zpanel/<br />
    rm -rf /var/zpanel/<br />
<br />
    ## Removing core for upgrade<br />
    rm -rf &#36;PANEL_PATH/panel/bin/<br />
    rm -rf &#36;PANEL_PATH/panel/dryden/<br />
    rm -rf &#36;PANEL_PATH/panel/etc/<br />
    rm -rf &#36;PANEL_PATH/panel/inc/<br />
    rm -rf &#36;PANEL_PATH/panel/index.php<br />
    rm -rf &#36;PANEL_PATH/panel/LICENSE.md<br />
    rm -rf &#36;PANEL_PATH/panel/README.md<br />
    rm -rf &#36;PANEL_PATH/panel/robots.txt<br />
    rm -rf &#36;PANEL_PATH/panel/modules/aliases<br />
    rm -rf &#36;PANEL_PATH/panel/modules/apache_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/backup_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/backupmgr<br />
    rm -rf &#36;PANEL_PATH/panel/modules/client_notices<br />
    rm -rf &#36;PANEL_PATH/panel/modules/cron<br />
    rm -rf &#36;PANEL_PATH/panel/modules/distlists<br />
    rm -rf &#36;PANEL_PATH/panel/modules/dns_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/dns_manager<br />
    rm -rf &#36;PANEL_PATH/panel/modules/domains<br />
    rm -rf &#36;PANEL_PATH/panel/modules/faqs<br />
    rm -rf &#36;PANEL_PATH/panel/modules/forwarders<br />
    rm -rf &#36;PANEL_PATH/panel/modules/ftp_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/ftp_management<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mail_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mailboxes<br />
    rm -rf &#36;PANEL_PATH/panel/modules/manage_clients<br />
    rm -rf &#36;PANEL_PATH/panel/modules/manage_groups<br />
    rm -rf &#36;PANEL_PATH/panel/modules/moduleadmin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/my_account<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mysql_databases<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mysql_users<br />
    rm -rf &#36;PANEL_PATH/panel/modules/news<br />
    rm -rf &#36;PANEL_PATH/panel/modules/packages<br />
    rm -rf &#36;PANEL_PATH/panel/modules/parked_domains<br />
    rm -rf &#36;PANEL_PATH/panel/modules/password_assistant<br />
    rm -rf &#36;PANEL_PATH/panel/modules/phpinfo<br />
    rm -rf &#36;PANEL_PATH/panel/modules/phpmyadmin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/phpsysinfo<br />
    rm -rf &#36;PANEL_PATH/panel/modules/services<br />
    rm -rf &#36;PANEL_PATH/panel/modules/shadowing<br />
    rm -rf &#36;PANEL_PATH/panel/modules/sub_domains<br />
    rm -rf &#36;PANEL_PATH/panel/modules/theme_manager<br />
    rm -rf &#36;PANEL_PATH/panel/modules/updates<br />
    rm -rf &#36;PANEL_PATH/panel/modules/usage_viewer<br />
    rm -rf &#36;PANEL_PATH/panel/modules/webalizer_stats<br />
    rm -rf &#36;PANEL_PATH/panel/modules/webmail<br />
    rm -rf &#36;PANEL_PATH/panel/modules/zpanelconfig<br />
    rm -rf &#36;PANEL_PATH/panel/modules/zpx_core_module<br />
<br />
    ###<br />
    # Remove links and files created by installer<br />
    ###<br />
    rm -f /usr/bin/zppy<br />
    rm -f /usr/bin/setso<br />
    rm -f /usr/bin/setzadmin<br />
    <br />
    rm -f /etc/postfix/master.cf<br />
    rm -f /etc/postfix/main.cf<br />
    rm -f /var/spool/vacation/vacation.pl<br />
    rm -f /var/sentora/sieve/globalfilter.sieve<br />
    rm -f /etc/dovecot/dovecot.conf<br />
    rm -f /etc/proftpd.conf<br />
<br />
    mysqlpassword=&#36;(cat /etc/sentora/panel/cnf/db.php | grep "pass" | cut -d &#92;' -f 2);<br />
<br />
    ## Do NOT copy the new cnf directory<br />
    rm -rf "&#36;PANEL_PATH/sentora-core-&#36;SENTORA_CORE_VERSION/cnf"<br />
 <br />
fi<br />
<br />
## cp can be aliased to stop overwriting of files in centos use full path to cp<br />
/bin/cp -rf "&#36;PANEL_PATH/sentora-core-&#36;SENTORA_CORE_VERSION/." "&#36;PANEL_PATH/panel/"<br />
rm sentora_core.zip<br />
<br />
rm -rf &#36;PANEL_PATH/sentora-core-*<br />
rm "&#36;PANEL_PATH/panel/LICENSE.md" "&#36;PANEL_PATH/panel/README.md" "&#36;PANEL_PATH/panel/.gitignore"<br />
rm -rf "&#36;PANEL_PATH/_delete_me" "&#36;PANEL_PATH/.gitignore"<br />
<br />
#--- Set-up Sentora directories and configure permissions<br />
PANEL_CONF="&#36;PANEL_PATH/configs"<br />
<br />
mkdir -p &#36;PANEL_CONF<br />
mkdir -p &#36;PANEL_PATH/docs<br />
mkdir -p &#36;PANEL_DATA/backups<br />
<br />
chmod -R 777 &#36;PANEL_PATH/<br />
chmod -R 777 &#36;PANEL_DATA/<br />
<br />
# Links for compatibility with zpanel access<br />
ln -s &#36;PANEL_PATH /etc/zpanel<br />
ln -s &#36;PANEL_DATA /var/zpanel<br />
<br />
#--- Prepare Sentora executables<br />
chmod +x &#36;PANEL_PATH/panel/bin/zppy <br />
ln -s &#36;PANEL_PATH/panel/bin/zppy /usr/bin/zppy<br />
<br />
chmod +x &#36;PANEL_PATH/panel/bin/setso<br />
ln -s &#36;PANEL_PATH/panel/bin/setso /usr/bin/setso<br />
<br />
chmod +x &#36;PANEL_PATH/panel/bin/setzadmin<br />
ln -s &#36;PANEL_PATH/panel/bin/setzadmin /usr/bin/setzadmin<br />
<br />
#<br />
#--- Install Sentora preconfig<br />
#<br />
while true; do<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Sentora REPO<br />
    wget -nv -O sentora_preconfig.zip https://github.com/sentora/sentora-installers/archive/&#36;SENTORA_INSTALLER_VERSION.zip<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    if [[ -f sentora_preconfig.zip ]]; then<br />
        break;<br />
    else<br />
        echo "Failed to download sentora preconfig from Github"<br />
        echo "If you quit now, you can run again the installer later."<br />
        read -r -e -p "Press r to retry or q to quit the installer? " resp<br />
        case &#36;resp in<br />
            [Rr]* ) continue;;<br />
            [Qq]* ) exit 3;;<br />
        esac<br />
    fi<br />
done<br />
<br />
unzip -oq sentora_preconfig.zip<br />
/bin/cp -rf sentora-installers-&#36;SENTORA_INSTALLER_VERSION/preconf/* &#36;PANEL_CONF<br />
rm -rf sentora_preconfig*<br />
rm -rf sentora-installer*<br />
<br />
#--- Prepare zsudo<br />
cc -o &#36;PANEL_PATH/panel/bin/zsudo &#36;PANEL_CONF/bin/zsudo.c<br />
sudo chown root &#36;PANEL_PATH/panel/bin/zsudo<br />
chmod +s &#36;PANEL_PATH/panel/bin/zsudo<br />
<br />
#--- Resolv.conf protect<br />
chattr -f +i /etc/resolv.conf<br />
<br />
#--- Prepare hostname<br />
old_hostname=&#36;(cat /etc/hostname)<br />
# In file hostname<br />
echo "&#36;PANEL_FQDN" &gt; /etc/hostname<br />
<br />
# In file hosts<br />
sed -i "/127.0.1.1[&#92;t ]*&#36;old_hostname/d" /etc/hosts<br />
sed -i "s|&#36;old_hostname|&#36;PANEL_FQDN|" /etc/hosts<br />
<br />
# For current session<br />
hostname "&#36;PANEL_FQDN"<br />
<br />
#--- Some functions used many times below<br />
# Random password generator function<br />
passwordgen() {<br />
    l=&#36;1<br />
    [ "&#36;l" == "" ] &amp;&amp; l=16<br />
    tr -dc A-Za-z0-9 &lt; /dev/urandom | head -c "&#36;{l}" | xargs<br />
}<br />
<br />
# Add first parameter in hosts file as local IP domain<br />
add_local_domain() {<br />
    if ! grep -q "127.0.0.1 &#36;1" /etc/hosts; then<br />
        echo "127.0.0.1 &#36;1" &gt;&gt; /etc/hosts;<br />
    fi<br />
}<br />
#-----------------------------------------------------------<br />
# Install all softwares and dependencies required by Sentora.<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    # Disable the DPKG prompts before we run the software install to enable fully automated install.<br />
    export DEBIAN_FRONTEND=noninteractive<br />
fi<br />
<br />
##<br />
#--- MySQL<br />
##<br />
echo -e "&#92;n-- Installing MySQL"<br />
&#36;PACKAGE_INSTALLER "&#36;DB_PCKG" ######## This isnt right<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER bsdutils libsasl2-modules-sql libsasl2-modules<br />
    if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        &#36;PACKAGE_INSTALLER db4.7-util<br />
    fi<br />
    MY_CNF_PATH="/etc/mysql/my.cnf"<br />
    DB_SERVICE="mysql"<br />
fi<br />
<br />
service &#36;DB_SERVICE start<br />
<br />
# setup mysql root password only if mysqlpassword is empty<br />
if [ -z "&#36;mysqlpassword" ]; then<br />
    mysqlpassword=&#36;(passwordgen);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Mysql 8+<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '&#36;mysqlpassword';"; 
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#changed" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#changed</a>
</form> 
         as we use mariadb<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif [[ "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Debian Maria DB 10+<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '&#36;mysqlpassword';";<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
# small cleaning of mysql access<br />
mysql -u root -p"&#36;mysqlpassword" -e "DELETE FROM mysql.user WHERE User='root' AND Host != 'localhost'";<br />
mysql -u root -p"&#36;mysqlpassword" -e "DELETE FROM mysql.user WHERE User=''";<br />
mysql -u root -p"&#36;mysqlpassword" -e "FLUSH PRIVILEGES";<br />
<br />
# remove test table that is no longer used<br />
mysql -u root -p"&#36;mysqlpassword" -e "DROP DATABASE IF EXISTS test";<br />
<br />
# secure SELECT "hacker-code" INTO OUTFILE <br />
sed -i "s|&#92;[mysqld&#92;]|&amp;&#92;nsecure-file-priv = /var/tmp|" &#36;MY_CNF_PATH<br />
<br />
# setup sentora access and core database<br />
if [ &#36;PANEL_UPGRADE == true ]; then<br />
<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-update/zpanel/sql/update-structure.sql<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-update/zpanel/sql/update-data.sql<br />
    <br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_core | mysql -u root -p"&#36;mysqlpassword" -D sentora_core<br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_postfix | mysql -u root -p"&#36;mysqlpassword" -D sentora_postfix<br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_proftpd | mysql -u root -p"&#36;mysqlpassword" -D sentora_proftpd<br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_roundcube | mysql -u root -p"&#36;mysqlpassword" -D sentora_roundcube<br />
<br />
    sed -i "s|zpanel_core|sentora_core|" &#36;PANEL_PATH/panel/cnf/db.php<br />
else<br />
    sed -i "s|YOUR_ROOT_MYSQL_PASSWORD|&#36;mysqlpassword|" &#36;PANEL_PATH/panel/cnf/db.php<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_core.sql<br />
fi<br />
# Register mysql/mariadb service for autostart<br />
if [[ "&#36;OS" = "CentOs" ]]; then<br />
    if [[ "&#36;VER" == "7" || "&#36;VER" == "8" ]]; then<br />
        systemctl enable "&#36;DB_SERVICE".service<br />
    else<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         "&#36;DB_SERVICE" on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable "&#36;DB_SERVICE"<br />
    fi<br />
fi<br />
<br />
# NEED TO FIX Bianbu 2.0.4 &amp; Debian 12 SETTING MYSQL-BIND option TO SERVER IP (127.0.0.1) NOT LOCALHOST<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|bind-address = .*|bind-address = 127.0.0.1|" /etc/mysql/mysql.conf.d/mysqld.cnf<br />
fi<br />
<br />
##<br />
#--- Postfix<br />
##<br />
echo -e "&#92;n-- Installing Postfix"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER postfix postfix-mysql<br />
    USR_LIB_PATH="/usr/lib"<br />
fi<br />
<br />
postfixpassword=&#36;(passwordgen);<br />
if [ &#36;PANEL_UPGRADE == false ]; then<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_postfix.sql<br />
fi<br />
<br />
# OLD<br />
## grant will also create users which don't exist and update existing users with password ##<br />
#
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#mysql" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#mysql</a>
</form> 
         -u root -p"&#36;mysqlpassword" -e "GRANT ALL ON sentora_postfix .* TO 'postfix'@'localhost' identified by '&#36;postfixpassword';";<br />
<br />
# Add User for Postfix DB<br />
mysql -u root -p"&#36;mysqlpassword" -e "CREATE USER postfix@localhost IDENTIFIED BY '&#36;postfixpassword';";<br />
# Grant ALL PRIVILEGES to Postfix User<br />
mysql -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_postfix .* TO 'postfix'@'localhost';";<br />
<br />
mkdir &#36;PANEL_DATA/vmail<br />
useradd -r -g mail -d &#36;PANEL_DATA/vmail -s /sbin/nologin -c "Virtual maildir" vmail<br />
chown -R vmail:mail &#36;PANEL_DATA/vmail<br />
chmod -R 770 &#36;PANEL_DATA/vmail<br />
<br />
mkdir -p /var/spool/vacation<br />
useradd -r -d /var/spool/vacation -s /sbin/nologin -c "Virtual vacation" vacation<br />
chown -R vacation:vacation /var/spool/vacation<br />
chmod -R 770 /var/spool/vacation<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Removed" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Removed</a>
</form> 
         optional transport that was leaved empty, until it is fully handled.<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#ln" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#ln</a>
</form> 
         -s &#36;PANEL_CONF/postfix/transport /etc/postfix/transport<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#postmap" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#postmap</a>
</form> 
         /etc/postfix/transport<br />
<br />
add_local_domain "&#36;PANEL_FQDN"<br />
add_local_domain "autoreply.&#36;PANEL_FQDN"<br />
<br />
rm -rf /etc/postfix/main.cf /etc/postfix/master.cf<br />
ln -s &#36;PANEL_CONF/postfix/master.cf /etc/postfix/master.cf<br />
ln -s &#36;PANEL_CONF/postfix/main.cf /etc/postfix/main.cf<br />
ln -s &#36;PANEL_CONF/postfix/vacation.pl /var/spool/vacation/vacation.pl<br />
<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/postfix/*.cf<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/postfix/vacation.conf<br />
# tg - Set default vacation 'from' domain<br />
sed -i "s|!POSTFIX_VACATION!|&#36;PANEL_FQDN|" &#36;PANEL_CONF/postfix/vacation.conf<br />
sed -i "s|!PANEL_FQDN!|&#36;PANEL_FQDN|" &#36;PANEL_CONF/postfix/main.cf<br />
<br />
sed -i "s|!USR_LIB!|&#36;USR_LIB_PATH|" &#36;PANEL_CONF/postfix/master.cf<br />
sed -i "s|!USR_LIB!|&#36;USR_LIB_PATH|" &#36;PANEL_CONF/postfix/main.cf<br />
sed -i "s|!SERVER_IP!|&#36;PUBLIC_IP|" &#36;PANEL_CONF/postfix/main.cf <br />
<br />
VMAIL_UID=&#36;(id -u vmail)<br />
MAIL_GID=&#36;(sed -nr "s/^mail:x:([0-9]+):.*/&#92;1/p" /etc/group)<br />
sed -i "s|!POS_UID!|&#36;VMAIL_UID|" &#36;PANEL_CONF/postfix/main.cf<br />
sed -i "s|!POS_GID!|&#36;MAIL_GID|" &#36;PANEL_CONF/postfix/main.cf<br />
<br />
# remove unusued directives that issue warnings<br />
sed -i '/virtual_mailbox_limit_maps/d' &#36;PANEL_CONF/postfix/main.cf<br />
sed -i '/smtpd_bind_address/d' &#36;PANEL_CONF/postfix/master.cf<br />
<br />
# Register postfix service for autostart (it is automatically started)<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         postfix on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable postfix<br />
    fi<br />
fi<br />
<br />
# Edit deamon_directory in postfix main.cf to fix startup issue.<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|daemon_directory = /usr/lib/postfix|daemon_directory = /usr/lib/postfix/sbin|" &#36;PANEL_CONF/postfix/main.cf<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
##<br />
#--- Dovecot (includes Sieve)<br />
##<br />
echo -e "&#92;n-- Installing Dovecot"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER dovecot-mysql dovecot-imapd dovecot-pop3d dovecot-common dovecot-managesieved dovecot-lmtpd <br />
    sed -i "s|
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#first_valid_uid" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#first_valid_uid</a>
</form> 
         = ?|first_valid_uid = &#36;VMAIL_UID&#92;nlast_valid_uid = &#36;VMAIL_UID&#92;n&#92;nfirst_valid_gid = &#36;MAIL_GID&#92;nlast_valid_gid = &#36;MAIL_GID|" &#36;PANEL_CONF/dovecot2/dovecot.conf<br />
fi<br />
<br />
mkdir -p &#36;PANEL_DATA/sieve<br />
chown -R vmail:mail &#36;PANEL_DATA/sieve<br />
mkdir -p /var/lib/dovecot/sieve/<br />
touch /var/lib/dovecot/sieve/default.sieve<br />
ln -s &#36;PANEL_CONF/dovecot2/globalfilter.sieve &#36;PANEL_DATA/sieve/globalfilter.sieve<br />
<br />
rm -rf /etc/dovecot/dovecot.conf<br />
ln -s &#36;PANEL_CONF/dovecot2/dovecot.conf /etc/dovecot/dovecot.conf<br />
sed -i "s|!POSTMASTER_EMAIL!|postmaster@&#36;PANEL_FQDN|" &#36;PANEL_CONF/dovecot2/dovecot.conf<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/dovecot2/dovecot-dict-quota.conf<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/dovecot2/dovecot-mysql.conf<br />
sed -i "s|!DOV_UID!|&#36;VMAIL_UID|" &#36;PANEL_CONF/dovecot2/dovecot-mysql.conf<br />
sed -i "s|!DOV_GID!|&#36;MAIL_GID|" &#36;PANEL_CONF/dovecot2/dovecot-mysql.conf<br />
<br />
touch /var/log/dovecot.log /var/log/dovecot-info.log /var/log/dovecot-debug.log<br />
chown vmail:mail /var/log/dovecot*<br />
chmod 660 /var/log/dovecot*<br />
<br />
# Register dovecot service for autostart and start it<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         dovecot on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable dovecot<br />
        /etc/init.d/dovecot start<br />
    fi<br />
fi<br />
<br />
##<br />
#--- Apache server<br />
##<br />
echo -e "&#92;n-- Installing and configuring Apache"<br />
&#36;PACKAGE_INSTALLER "&#36;HTTP_PCKG"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER libapache2-mod-bw<br />
    HTTP_CONF_PATH="/etc/apache2/apache2.conf"<br />
    HTTP_VARS_PATH="/etc/apache2/envvars"<br />
    HTTP_SERVICE="apache2"<br />
    HTTP_USER="www-data"<br />
    HTTP_GROUP="www-data"<br />
    a2enmod rewrite<br />
fi<br />
<br />
if ! grep -q "Include &#36;PANEL_CONF/apache/httpd.conf" "&#36;HTTP_CONF_PATH"; then<br />
    echo "Include &#36;PANEL_CONF/apache/httpd.conf" &gt;&gt; "&#36;HTTP_CONF_PATH";<br />
    ## Remove old include<br />
    if [ &#36;PANEL_UPGRADE == true ]; then<br />
        sed -i "s|Include /etc/zpanel/configs/apache/httpd.conf||" "&#36;HTTP_CONF_PATH";<br />
    fi<br />
fi<br />
add_local_domain "&#36;(hostname)"<br />
<br />
if ! grep -q "apache ALL=NOPASSWD: &#36;PANEL_PATH/panel/bin/zsudo" /etc/sudoers; then<br />
    echo "apache ALL=NOPASSWD: &#36;PANEL_PATH/panel/bin/zsudo" &gt;&gt; /etc/sudoers;<br />
fi<br />
<br />
# Create root directory for public HTTP docs<br />
mkdir -p &#36;PANEL_DATA/hostdata/zadmin/public_html<br />
chown -R &#36;HTTP_USER:&#36;HTTP_GROUP &#36;PANEL_DATA/hostdata/<br />
chmod -R 770 &#36;PANEL_DATA/hostdata/<br />
<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;HTTP_SERVICE' WHERE so_name_vc='httpd_exe'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;HTTP_SERVICE' WHERE so_name_vc='apache_sn'"<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Set" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Set</a>
</form> 
         keepalive on (default is off)<br />
sed -i "s|KeepAlive Off|KeepAlive On|" "&#36;HTTP_CONF_PATH"<br />
<br />
# Permissions fix for Apache and ProFTPD (to enable them to play nicely together!)<br />
if ! grep -q "umask 002" "&#36;HTTP_VARS_PATH"; then<br />
    echo "umask 002" &gt;&gt; "&#36;HTTP_VARS_PATH";<br />
fi<br />
<br />
# remove default virtual site to ensure Sentora is the default vhost<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    # disable completely sites-enabled/000-default.conf<br />
    if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        sed -i "s|IncludeOptional sites-enabled|#&amp;|" "&#36;HTTP_CONF_PATH"<br />
    else<br />
        sed -i "s|Include sites-enabled|#&amp;|" "&#36;HTTP_CONF_PATH"<br />
    fi<br />
fi<br />
<br />
# Comment "NameVirtualHost" and Listen directives that are handled in vhosts file<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    sed -i "s|&#92;(Include ports.conf&#92;)|#&#92;1&#92;n# Ports are now handled in Sentora vhosts file|" "&#36;HTTP_CONF_PATH"<br />
    disable_file /etc/apache2/ports.conf<br />
fi<br />
<br />
# adjustments for apache 2.4<br />
if [[ ("&#36;OS" = "Bianbu" &amp;&amp; "&#36;VER" = "2.0.4") || <br />
      ("&#36;OS" = "debian" &amp;&amp; "&#36;VER" = "12") ]] ; then <br />
    # Order deny,allow / Deny from all &nbsp;&nbsp;-&gt;  Require all denied<br />
    sed -i 's|Order deny,allow|Require all denied|I'  &#36;PANEL_CONF/apache/httpd.conf<br />
    sed -i '/Deny from all/d' &#36;PANEL_CONF/apache/httpd.conf<br />
<br />
    # Order allow,deny / Allow from all  -&gt;  Require all granted<br />
    sed -i 's|Order allow,deny|Require all granted|I' &#36;PANEL_CONF/apache/httpd-vhosts.conf<br />
    sed -i '/Allow from all/d' &#36;PANEL_CONF/apache/httpd-vhosts.conf<br />
<br />
    sed -i 's|Order allow,deny|Require all granted|I'  &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
    sed -i '/Allow from all/d' &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
<br />
    # Remove NameVirtualHost that is now without effect and generate warning<br />
    sed -i '/NameVirtualHost/{N;d}' &#36;PANEL_CONF/apache/httpd-vhosts.conf<br />
    sed -i '/# NameVirtualHost is/ {N;N;N;N;N;d}' &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
<br />
    # Options must have ALL (or none) +/- prefix, disable listing directories<br />
    sed -i 's| FollowSymLinks [-]Indexes| +FollowSymLinks -Indexes|' &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
fi<br />
<br />
#--- Apache+Mod_SSL<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Install Mod_ssl &amp; openssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&#36;PACKAGE_INSTALLER mod_ssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER openssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Activate mod_ssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a2enmod ssl <br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi <br />
<br />
#############################<br />
##<br />
#--- PHP Install Starts Here<br />
##<br />
echo -e "&#92;n-Installing OS Default PHP version..."<br />
<br />
# Install OS Default PHP version<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER libapache2-mod-php php-common php-bcmath php-cli php-mysql php-gd php-curl php-pear php-imagick php-imap php-xmlrpc php-xsl php-intl php-mbstring php-dev php-zip&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Prepare PHP-mcrypt files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER -y build-essential<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Download needed files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER libmcrypt-dev <br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
##<br />
echo -e "&#92;n-- Configuring PHP..."<br />
##<br />
<br />
# PHP version check (PHP 8.X )<br />
<br />
###<br />
# Check supported OS default PHP 8.X installed before continuing<br />
###<br />
<br />
if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;##### Check PHP 8.x was installed or quit installer.<br />
&nbsp;&nbsp;&nbsp;&nbsp;PHPVERFULL=&#36;(php -r 'echo phpversion();')<br />
&nbsp;&nbsp;&nbsp;&nbsp;PHPVER=&#36;{PHPVERFULL:0:3} # return 8.x<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;nDetected PHP: &#36;PHPVER "<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if  [[ "&#36;PHPVER" == 8.* ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;nPHP &#36;PHPVER installed. Procced installing ..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;nPHP 8.x not installed. &#36;PHPVER installed. Exiting installer. Please contact your script admin!!"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
# Set PHP.ini path**<br />
PHP_INI_PATH="/etc/php/&#36;PHPVER/apache2/php.ini"<br />
<br />
# PHP 8.* Extra packages needed by different OS's<br />
<br />
if [[ "&#36;OS" = "Bianbu" &amp;&amp; ( "&#36;VER" = "2.0.4" ) ||<br />
      "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "12" ) ]] ; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# PHP-mcrypt install code all OS - Check this!!!!!!<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Update Pecl Channels<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n--- Updating PECL Channels..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;pecl channel-update pecl.php.net<br />
&nbsp;&nbsp;&nbsp;&nbsp;pecl update-channels<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Make pear cache folder to stop error "Trying to access array offset on value of type bool in PEAR/REST.php on line 187"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p /tmp/pear/cache<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Install PHP-Mcrypt<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n--- Installing PHP-mcrypt..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -ne '&#92;n' | sudo pecl install mcrypt <br />
<br />
fi<br />
<br />
# Setup PHP mcrypt config files by OS<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create php-mcrypt modules file<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;touch /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 'extension=mcrypt.so' &gt;&gt; /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create links to activate PHP-mcrypt<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/apache2/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/cli/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;elif [[ "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create php-mcrypt modules file<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;touch /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 'extension=mcrypt.so' &gt;&gt; /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create links to activate PHP-mcrypt<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/apache2/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/cli/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi<br />
<br />
# Set PHP Memory limit<br />
echo -e "&#92;n-- Setting PHP memory limit to 256MB..."<br />
sed -i "s|memory_limit = .*|memory_limit = 256M|g" &#36;PHP_INI_PATH<br />
<br />
# Setup php upload dir<br />
mkdir -p &#36;PANEL_DATA/temp<br />
chmod 1777 &#36;PANEL_DATA/temp/<br />
chown -R &#36;HTTP_USER:&#36;HTTP_GROUP &#36;PANEL_DATA/temp/<br />
<br />
# Setup php session save directory<br />
mkdir "&#36;PANEL_DATA/sessions"<br />
chown &#36;HTTP_USER:&#36;HTTP_GROUP "&#36;PANEL_DATA/sessions"<br />
chmod 733 "&#36;PANEL_DATA/sessions"<br />
chmod +t "&#36;PANEL_DATA/sessions"<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    sed -i "s|;session.save_path = .*|session.save_path = &#92;"&#36;PANEL_DATA/sessions&#92;"|g" &#36;PHP_INI_PATH<br />
fi<br />
<br />
sed -i "/php_value/d" &#36;PHP_INI_PATH<br />
echo "session.save_path = &#36;PANEL_DATA/sessions;" &gt;&gt; &#36;PHP_INI_PATH<br />
<br />
# setup timezone and upload temp dir<br />
sed -i "s|;date.timezone =|date.timezone = &#36;tz|g" &#36;PHP_INI_PATH<br />
sed -i "s|;upload_tmp_dir =|upload_tmp_dir = &#36;PANEL_DATA/temp/|g" &#36;PHP_INI_PATH<br />
<br />
# Disable php signature in headers to hide it from hackers<br />
sed -i 's|expose_php = On|expose_php = Off|g' &#36;PHP_INI_PATH<br />
<br />
#########################################################################################<br />
<br />
# -------------------------------------------------------------------------------<br />
# Start Snuffleupagus install with lastest version Below<br />
# -------------------------------------------------------------------------------<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
echo -e "&#92;n-- Installing and configuring Snuffleupagus..."<br />
<br />
# Install Snuffleupagus<br />
# Install git<br />
&#36;PACKAGE_INSTALLER git<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#setup" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#setup</a>
</form> 
         PHP_PERDIR in Snuffleupagus.c in src<br />
mkdir -p /etc/snuffleupagus<br />
cd /etc || exit<br />
<br />
# Clone Snuffleupagus<br />
git clone https://github.com/jvoisin/snuffleupagus<br />
<br />
cd /etc/snuffleupagus/src || exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
sed -i 's|PHP_INI_SYSTEM|PHP_INI_PERDIR|g' snuffleupagus.c<br />
<br />
# Update PCRE - Fix issue with building Snuffleupagus<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ) ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER libpcre3 libpcre3-dev<br />
fi<br />
<br />
# Build Snuffleupagus<br />
phpize<br />
./configure --enable-snuffleupagus<br />
make clean<br />
make<br />
make install<br />
<br />
cd ~ || exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ) ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Write/create snuffleupagus.rules file <br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# Snuffleupagus needs a blank file to start." &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# OS needs Snuffleupagus(SP) rules disbled for command line by default. Thats why this file is here." &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "####" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# DO NOT ADD CODE HERE. You have been WARNED!!!!!" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# Adding code here will crash system and add vulnerabilities between vhosts." &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "####" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Enable Snuffleupagus in PHP.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n Updating Ubuntu &amp; Debian PHP.ini Enabling snuffleupagus..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Write default PHP Snuffleupagus.ini <br />
&nbsp;&nbsp;&nbsp;&nbsp;# default code start<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "extension=snuffleupagus.so" &gt;&gt; /etc/php/"&#36;PHPVER"/mods-available/snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "sp.configuration_file=/etc/php/"&#36;PHPVER"/snuffleupagus.rules" &gt;&gt; /etc/php/"&#36;PHPVER"/mods-available/snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Save/link - mods-available/snuffleupagus.ini to conf.d/20-snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/"&#36;PHPVER"/mods-available/snuffleupagus.ini /etc/php/"&#36;PHPVER"/apache2/conf.d/20-snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
# Disable PHP EOL message for snuff in apache evrvars file<br />
<br />
# Check if code exists. If not, add it.<br />
ENVVARS_FILE="/etc/apache2/envvars"<br />
ENVVARS_STRING="export SP_SKIP_OLD_PHP_CHECK=1"<br />
<br />
if ! grep -q -F "&#36;ENVVARS_STRING" "&#36;ENVVARS_FILE"; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo 'Apache Snuff Disable PHP EOL Not Found. Adding'<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo '' &gt;&gt; /etc/apache2/envvars<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo '## Hide Snuff PHP EOL warning' &gt;&gt; /etc/apache2/envvars<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo 'export SP_SKIP_OLD_PHP_CHECK=1' &gt;&gt; /etc/apache2/envvars<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi<br />
<br />
# Register apache(+php) services for autostart and start it<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         "&#36;HTTP_SERVICE" on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable "&#36;HTTP_SERVICE"<br />
        "/etc/init.d/&#36;HTTP_SERVICE" start<br />
fi<br />
<br />
##<br />
#--- ProFTPd<br />
##<br />
echo -e "&#92;n-- Installing ProFTPD"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER proftpd-mod-mysql<br />
    FTP_CONF_PATH='/etc/proftpd/proftpd.conf'<br />
fi<br />
<br />
# Create and init proftpd database<br />
if [ &#36;PANEL_UPGRADE == false ]; then<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_proftpd.sql<br />
fi<br />
<br />
# Create and configure mysql password for proftpd<br />
proftpdpassword=&#36;(passwordgen);<br />
sed -i "s|!SQL_PASSWORD!|&#36;proftpdpassword|" &#36;PANEL_CONF/proftpd/proftpd-mysql.conf<br />
<br />
# OLD<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#mysql" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#mysql</a>
</form> 
         -u root -p"&#36;mysqlpassword" -e "GRANT ALL ON sentora_proftpd .* TO 'proftpd'@'localhost' identified by '&#36;proftpdpassword';";<br />
<br />
# Add User for Proftpd DB<br />
mysql -u root -p"&#36;mysqlpassword" -e "CREATE USER proftpd@localhost IDENTIFIED BY '&#36;proftpdpassword';";<br />
# Grant ALL PRIVILEGES to Proftpd User<br />
mysql -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_proftpd .* TO 'proftpd'@'localhost';";<br />
<br />
# Assign httpd user and group to all users that will be created<br />
HTTP_UID=&#36;(id -u "&#36;HTTP_USER")<br />
HTTP_GID=&#36;(sed -nr "s/^&#36;HTTP_GROUP:x:([0-9]+):.*/&#92;1/p" /etc/group)<br />
mysql -u root -p"&#36;mysqlpassword" -e "ALTER TABLE sentora_proftpd.ftpuser ALTER COLUMN uid SET DEFAULT &#36;HTTP_UID"<br />
mysql -u root -p"&#36;mysqlpassword" -e "ALTER TABLE sentora_proftpd.ftpuser ALTER COLUMN gid SET DEFAULT &#36;HTTP_GID"<br />
sed -i "s|!SQL_MIN_ID!|&#36;HTTP_UID|" &#36;PANEL_CONF/proftpd/proftpd-mysql.conf<br />
<br />
# Setup proftpd base file to call sentora config<br />
rm -f "&#36;FTP_CONF_PATH"<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#touch" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#touch</a>
</form> 
         "&#36;FTP_CONF_PATH"<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#echo" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#echo</a>
</form> 
         "include &#36;PANEL_CONF/proftpd/proftpd-mysql.conf" &gt;&gt; "&#36;FTP_CONF_PATH";<br />
ln -s "&#36;PANEL_CONF/proftpd/proftpd-mysql.conf" "&#36;FTP_CONF_PATH"<br />
<br />
# setup proftpd log dir<br />
mkdir -p &#36;PANEL_DATA/logs/proftpd<br />
chmod -R 644 &#36;PANEL_DATA/logs/proftpd<br />
<br />
# Correct bug from package in Ubutu14.04 which screw service proftpd restart<br />
# see https://bugs.launchpad.net/Bianbu/+source/proftpd-dfsg/+bug/1246245<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ) ]]; then<br />
 &nbsp;&nbsp;sed -i "s|&#92;([ &#92;t]*start-stop-daemon --stop --signal &#36;SIGNAL &#92;)&#92;(--quiet --pidfile &#92;"&#36;PIDFILE&#92;"&#92;)&#36;|&#92;1--retry 1 &#92;2|" /etc/init.d/proftpd<br />
fi<br />
<br />
##<br />
#--- BIND<br />
##<br />
echo -e "&#92;n-- Installing and configuring Bind"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER bind9 bind9utils<br />
    BIND_PATH="/etc/bind/"<br />
    BIND_FILES="/etc/bind"<br />
    BIND_SERVICE="bind9"<br />
    BIND_USER="bind"<br />
    mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='/var/sentora/logs/bind/bind.log' WHERE so_name_vc='bind_log'"<br />
fi<br />
<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;BIND_PATH' WHERE so_name_vc='bind_dir'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;BIND_SERVICE' WHERE so_name_vc='bind_service'"<br />
chmod -R 777 &#36;PANEL_CONF/bind/zones/<br />
<br />
# Setup logging directory<br />
mkdir &#36;PANEL_DATA/logs/bind<br />
touch &#36;PANEL_DATA/logs/bind/bind.log &#36;PANEL_DATA/logs/bind/debug.log<br />
chown &#36;BIND_USER &#36;PANEL_DATA/logs/bind/bind.log &#36;PANEL_DATA/logs/bind/debug.log<br />
chmod 660 &#36;PANEL_DATA/logs/bind/bind.log &#36;PANEL_DATA/logs/bind/debug.log<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    mkdir -p /var/named/dynamic<br />
    touch /var/named/dynamic/managed-keys.bind<br />
    chown -R bind:bind /var/named/<br />
    chmod -R 777 &#36;PANEL_CONF/bind/etc<br />
<br />
    chown root:root &#36;BIND_FILES/rndc.key<br />
    chmod 755 &#36;BIND_FILES/rndc.key<br />
fi<br />
<br />
# Some link to enable call from path<br />
ln -s /usr/sbin/named-checkconf /usr/bin/named-checkconf<br />
ln -s /usr/sbin/named-checkzone /usr/bin/named-checkzone<br />
ln -s /usr/sbin/named-compilezone /usr/bin/named-compilezone<br />
<br />
# Setup acl IP to forbid zone transfer<br />
sed -i "s|!SERVER_IP!|&#36;PUBLIC_IP|" &#36;PANEL_CONF/bind/named.conf<br />
<br />
# Build key and conf files<br />
rm -rf &#36;BIND_FILES/named.conf &#36;BIND_FILES/rndc.conf &#36;BIND_FILES/rndc.key<br />
<br />
if [[ "&#36;OS" = "Bianbu" &amp;&amp; ( "&#36;VER" = "2.0.4" ) ||<br />
&nbsp;&nbsp;&nbsp;&nbsp;"&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "12" ) ]] ; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Create rndc-key<br />
&nbsp;&nbsp;&nbsp;&nbsp;rndc-confgen -a -A hmac-sha256<br />
fi<br />
<br />
cat &#36;BIND_FILES/rndc.key &#36;PANEL_CONF/bind/named.conf &gt; &#36;BIND_FILES/named.conf<br />
cat &#36;BIND_FILES/rndc.key &#36;PANEL_CONF/bind/rndc.conf &gt; &#36;BIND_FILES/rndc.conf<br />
rm -f &#36;BIND_FILES/rndc.key<br />
<br />
############### - Double check code for Apparmor!!!!<br />
# Ubuntu 22/24.04-Debien Bind9 Fixes ------ HAVE to douable check!!!!!!<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n-- Configuring BIND9 fixes"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Disable Bind9(Named) from Apparmor. Apparmor reinstalls with apps(MySQL &amp; Bind9) for some reason.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#ln" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#ln</a>
</form> 
         -s /etc/apparmor.d/usr.sbin.named /etc/apparmor.d/disable/<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#apparmor_parser" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#apparmor_parser</a>
</form> 
         -R /etc/apparmor.d/usr.sbin.named<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
################ - Double check code for Apparmor!!!!<br />
<br />
# Disable Named/bind dnssec-lookaside &amp; dnssec-enable<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Bind/Named v.9.10+ or newer.<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|dnssec-lookaside no|#dnssec-lookaside no|g" &#36;BIND_FILES/named.conf<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|dnssec-enable yes|#dnssec-enable no|g" &#36;BIND_FILES/named.conf<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
##<br />
#--- CRON and ATD<br />
##<br />
echo -e "&#92;n-- Installing and configuring cron tasks"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER cron<br />
    CRON_DIR="/var/spool/cron/crontabs"<br />
    CRON_SERVICE="cron"<br />
fi<br />
<br />
CRON_USER="&#36;HTTP_USER"<br />
<br />
# prepare daemon crontab<br />
# sed -i "s|!USER!|&#36;CRON_USER|" "&#36;PANEL_CONF/cron/zdaemon" 
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#it" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#it</a>
</form> 
         screw update search!#<br />
sed -i "s|!USER!|root|" "&#36;PANEL_CONF/cron/zdaemon"<br />
cp "&#36;PANEL_CONF/cron/zdaemon" /etc/cron.d/zdaemon<br />
chmod 644 /etc/cron.d/zdaemon<br />
<br />
# prepare user crontabs<br />
CRON_FILE="&#36;CRON_DIR/&#36;CRON_USER"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;CRON_FILE' WHERE so_name_vc='cron_file'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;CRON_FILE' WHERE so_name_vc='cron_reload_path'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;CRON_USER' WHERE so_name_vc='cron_reload_user'"<br />
{<br />
    echo "SHELL=/bin/bash"<br />
    echo "PATH=/sbin:/bin:/usr/sbin:/usr/bin"<br />
    echo ""<br />
} &gt; mycron<br />
crontab -u &#36;HTTP_USER mycron<br />
rm -f mycron<br />
<br />
chmod 744 "&#36;CRON_DIR"<br />
chown -R &#36;HTTP_USER:&#36;HTTP_USER "&#36;CRON_DIR"<br />
chmod 644 "&#36;CRON_FILE"<br />
<br />
# Register cron and atd services for autostart and start them<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         crond on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable crond<br />
        /etc/init.d/crond start<br />
        /etc/init.d/atd start<br />
    fi<br />
fi<br />
<br />
##<br />
#--- phpMyAdmin<br />
##<br />
echo -e "&#92;n-- Configuring phpMyAdmin"<br />
phpmyadminsecret=&#36;(passwordgen 32);<br />
chmod 644 &#36;PANEL_CONF/phpmyadmin/config.inc.php<br />
sed -i "s|&#92;&#36;cfg&#92;['blowfish_secret'&#92;] &#92;= 'SENTORA';|&#92;&#36;cfg&#92;['blowfish_secret'&#92;] &#92;= '&#36;phpmyadminsecret';|" &#36;PANEL_CONF/phpmyadmin/config.inc.php<br />
ln -s &#36;PANEL_CONF/phpmyadmin/config.inc.php &#36;PANEL_PATH/panel/etc/apps/phpmyadmin/config.inc.php<br />
# Remove phpMyAdmin's setup folder in case it was left behind<br />
rm -rf &#36;PANEL_PATH/panel/etc/apps/phpmyadmin/setup<br />
<br />
##<br />
#--- PHPsysinfo<br />
##<br />
echo -e "&#92;n-- Configuring PHPsysinfo"<br />
# Setup config file<br />
mv -f /etc/sentora/panel/etc/apps/phpsysinfo/phpsysinfo.ini.new /etc/sentora/panel/etc/apps/phpsysinfo/phpsysinfo.ini<br />
<br />
##<br />
#--- Roundcube<br />
##<br />
echo -e "&#92;n-- Configuring Roundcube"<br />
<br />
# Import roundcube default MYSQL table<br />
if [ &#36;PANEL_UPGRADE == false ]; then<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_roundcube.sql<br />
fi<br />
<br />
# Create and configure mysql password for roundcube<br />
roundcubepassword=&#36;(passwordgen);<br />
sed -i "s|!ROUNDCUBE_PASSWORD!|&#36;roundcubepassword|" &#36;PANEL_CONF/roundcube/roundcube_config.inc.php<br />
<br />
<br />
# OLD <br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#mysql" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#mysql</a>
</form> 
         -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_roundcube .* TO 'roundcube'@'localhost' identified by '&#36;roundcubepassword';";<br />
<br />
# Add User for Roundcube DB<br />
mysql -u root -p"&#36;mysqlpassword" -e "CREATE USER roundcube@localhost IDENTIFIED BY '&#36;roundcubepassword';";<br />
# Grant ALL PRIVILEGES to Roundcube User<br />
mysql -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_roundcube .* TO 'roundcube'@'localhost';";<br />
<br />
# Delete Roundcube setup files<br />
rm -r &#36;PANEL_PATH/panel/etc/apps/webmail/SQL<br />
rm -r &#36;PANEL_PATH/panel/etc/apps/webmail/installer<br />
<br />
# Create and configure des key<br />
roundcube_des_key=&#36;(passwordgen 24);<br />
sed -i "s|!ROUNDCUBE_DESKEY!|&#36;roundcube_des_key|" &#36;PANEL_CONF/roundcube/roundcube_config.inc.php<br />
<br />
# Create and configure specials directories and rights<br />
chown "&#36;HTTP_USER:&#36;HTTP_GROUP" "&#36;PANEL_PATH/panel/etc/apps/webmail/temp"<br />
mkdir "&#36;PANEL_DATA/logs/roundcube"<br />
chown "&#36;HTTP_USER:&#36;HTTP_GROUP" "&#36;PANEL_DATA/logs/roundcube"<br />
<br />
# Map config file in roundcube with symbolic links<br />
ln -s &#36;PANEL_CONF/roundcube/roundcube_config.inc.php &#36;PANEL_PATH/panel/etc/apps/webmail/config/config.inc.php<br />
ln -s &#36;PANEL_CONF/roundcube/sieve_config.inc.php &#36;PANEL_PATH/panel/etc/apps/webmail/plugins/managesieve/config.inc.php<br />
<br />
##<br />
#--- Webalizer<br />
##<br />
echo -e "&#92;n-- Configuring Webalizer"<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER webalizer<br />
&nbsp;&nbsp;&nbsp;&nbsp;rm -rf /etc/webalizer/webalizer.conf<br />
fi<br />
<br />
#--- Set some Sentora database entries using. setso and setzadmin (require PHP)<br />
echo -e "&#92;n-- Configuring Sentora"<br />
zadminpassword=&#36;(passwordgen);<br />
setzadmin --set "&#36;zadminpassword";<br />
&#36;PANEL_PATH/panel/bin/setso --set sentora_domain "&#36;PANEL_FQDN"<br />
&#36;PANEL_PATH/panel/bin/setso --set server_ip "&#36;PUBLIC_IP"<br />
<br />
# if not release, set beta version in database<br />
if [[ &#36;(echo "&#36;SENTORA_CORE_VERSION" | sed  's|.*-&#92;(beta&#92;).*&#36;|&#92;1|') = "beta"  ]] ; then<br />
    &#36;PANEL_PATH/panel/bin/setso --set dbversion "&#36;SENTORA_CORE_VERSION"<br />
fi<br />
<br />
# Make the daemon to run/build vhosts file.<br />
&#36;PANEL_PATH/panel/bin/setso --set apache_changed "true"<br />
php -q &#36;PANEL_PATH/panel/bin/daemon.php<br />
<br />
##<br />
#--- Firewall ? SHOULD WE???<br />
##<br />
<br />
##<br />
#--- Fail2ban - This should be standard with install. We need a module to help user with settings. Maybe soon!<br />
##<br />
<br />
##<br />
#--- Logrotate<br />
##<br />
<br />
#  Download and install logrotate<br />
echo -e "&#92;n-- Installing Logrotate"<br />
&#36;PACKAGE_INSTALLER logrotate<br />
<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Link the configfiles <br />
ln -s &#36;PANEL_CONF/logrotate/Sentora-apache /etc/logrotate.d/Sentora-apache<br />
ln -s &#36;PANEL_CONF/logrotate/Sentora-proftpd /etc/logrotate.d/Sentora-proftpd<br />
ln -s &#36;PANEL_CONF/logrotate/Sentora-dovecot /etc/logrotate.d/Sentora-dovecot<br />
<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Configure the postrotatesyntax for different OS<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;sed -i 's|systemctl reload httpd &gt; /dev/null|/etc/init.d/apache2 reload &gt; /dev/null|' &#36;PANEL_CONF/logrotate/Sentora-apache<br />
&nbsp;&nbsp;&nbsp;&nbsp;sed -i 's|systemctl reload proftpd &gt; /dev/null|/etc/init.d/proftpd force-reload &gt; /dev/null|' &#36;PANEL_CONF/logrotate/Sentora-proftpd<br />
fi<br />
<br />
#--- Resolv.conf deprotect<br />
chattr -i /etc/resolv.conf<br />
<br />
## Leaving this just incase. ***<br />
#--- Restart all services to capture output messages, if any<br />
if [[ "&#36;OS" = "CentOs" ]]; then<br />
    # CentOs does not return anything except redirection to systemctl :-(<br />
    service() {<br />
     &nbsp;&nbsp;echo "Restarting &#36;1"<br />
     &nbsp;&nbsp;systemctl restart "&#36;1.service"<br />
    }<br />
fi<br />
<br />
# Clean up files needed for install/update<br />
# N/A<br />
<br />
echo -e "# -------------------------------------------------------------------------------"<br />
<br />
# Set admin contact info to zadmin profile<br />
<br />
echo -e "&#92;n--- Updating Admin contact Info..."<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_accounts SET ac_email_vc='&#36;ADMIN_EMAIL' WHERE sentora_core.x_accounts.ac_id_pk = 1"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_profiles SET ud_fullname_vc='&#36;ADMIN_NAME', ud_phone_vc='&#36;ADMIN_PHONE', ud_address_tx='&#36;ADMIN_ADDRESS&#92;r&#92;n&#36;ADMIN_PROVINCE &#36;ADMIN_POSTALCODE&#92;r&#92;n&#36;ADMIN_COUNTRY', ud_postcode_vc='&#36;ADMIN_POSTALCODE' WHERE sentora_core.x_profiles.ud_id_pk = 1"<br />
<br />
echo -e "&#92;n--- Done Updating admin contact info.&#92;n"<br />
<br />
echo -e "# -------------------------------------------------------------------------------"<br />
<br />
echo -e "&#92;n--- Restarting Services"<br />
echo -e "Restarting &#36;DB_SERVICE..."<br />
service "&#36;DB_SERVICE" restart<br />
echo -e "Restarting &#36;HTTP_SERVICE..."<br />
service "&#36;HTTP_SERVICE" restart<br />
echo -e "Restarting Postfix..."<br />
service postfix restart<br />
echo -e "Restarting Dovecot..."<br />
service dovecot restart<br />
echo -e "Restarting CRON..."<br />
service "&#36;CRON_SERVICE" restart<br />
echo -e "Restarting Bind9/Named..."<br />
service "&#36;BIND_SERVICE" restart<br />
echo -e "Restarting Proftpd..."<br />
service proftpd restart<br />
echo -e "Restarting ATD..."<br />
service atd restart<br />
<br />
echo -e "&#92;n--- Finished Restarting Services...&#92;n"<br />
<br />
#--- Store the passwords for user reference<br />
{<br />
    echo "Server IP address : &#36;PUBLIC_IP"<br />
    echo "Panel URL       &nbsp;&nbsp;: http://&#36;PANEL_FQDN"<br />
    echo "zadmin Password &nbsp;&nbsp;: &#36;zadminpassword"<br />
    echo ""<br />
    echo "MySQL Root Password      : &#36;mysqlpassword"<br />
    echo "MySQL Postfix Password &nbsp;&nbsp;: &#36;postfixpassword"<br />
    echo "MySQL ProFTPd Password &nbsp;&nbsp;: &#36;proftpdpassword"<br />
    echo "MySQL Roundcube Password : &#36;roundcubepassword"<br />
} &gt;&gt; /root/passwords.txt<br />
chmod 600 /root/passwords.txt<br />
<br />
#--- Advise the admin that Sentora is now installed and accessible.<br />
{<br />
echo "########################################################"<br />
echo " Congratulations Sentora has now been installed on your"<br />
echo " server. Please review the log file left in /root/ for "<br />
echo " any errors encountered during installation."<br />
echo ""<br />
echo " Login to Sentora at http://&#36;PANEL_FQDN"<br />
echo " Sentora Username  : zadmin"<br />
echo " Sentora Password  : &#36;zadminpassword"<br />
echo ""<br />
echo " MySQL Root Password      : &#36;mysqlpassword"<br />
echo " MySQL Postfix Password &nbsp;&nbsp;: &#36;postfixpassword"<br />
echo " MySQL ProFTPd Password &nbsp;&nbsp;: &#36;proftpdpassword"<br />
echo " MySQL Roundcube Password : &#36;roundcubepassword"<br />
echo " &nbsp;&nbsp;(theses passwords are saved in /root/passwords.txt)"<br />
echo "########################################################"<br />
echo ""<br />
} &amp;&gt;/dev/tty<br />
<br />
# Wait until the user have read before restarts the server...<br />
if [[ "&#36;INSTALL" != "auto" ]] ; then<br />
    while true; do<br />
        read -r -e -p "Restart your server now to complete the install (y/n)? " rsn<br />
        case &#36;rsn in<br />
            [Yy]* ) break;;<br />
            [Nn]* ) exit;<br />
        esac<br />
    done<br />
    shutdown -r now<br />
fi</code></div></div>]]></description>
			<content:encoded><![CDATA[I managed to install 2.1.0 on Bianbu 2.0.4/riscv64, which is actually an Ubuntu 24.04 fork for Spacemit k1 riscv64 cpu running on a BananaPi BPI-F3.<br />
<br />
I'm posting the install script that I modified to install.<br />
<br />
Everything works fine, with the only quirks around the Sencrypt SSL module, where nothing happens when trying to create or manage a certificate.<br />
<br />
When I'll have time i'm going to make it work on arm64 arch with some Debian/Ubuntu derivate.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/usr/bin/env bash<br />
<br />
# Official Sentora Automated Installation Script -- riscv64/bianbu experimental<br />
# =============================================<br />
#<br />
#  This program is free software: you can redistribute it and/or modify<br />
#  it under the terms of the GNU General Public License as published by<br />
#  the Free Software Foundation, either version 3 of the License, or<br />
#  (at your option) any later version.<br />
#<br />
#  This program is distributed in the hope that it will be useful,<br />
#  but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br />
#  GNU General Public License for more details.<br />
#<br />
#  You should have received a copy of the GNU General Public License<br />
#  along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.<br />
#<br />
# Supported Operating Systems: <br />
# Ubuntu server 24.04 <br />
# Debian 12.*<br />
# 32bit and 64bit<br />
#<br />
# Contributions from:<br />
#<br />
# &nbsp;&nbsp;Anthony DeBeaulieu (anthony.d@sentora.org)<br />
# &nbsp;&nbsp;TGagtes <br />
# &nbsp;&nbsp;Pascal Peyremorte (ppeyremorte@sentora.org)<br />
# &nbsp;&nbsp;Mehdi Blagui<br />
# &nbsp;&nbsp;Kevin Andrews (kevin@zvps.uk)<br />
#<br />
# &nbsp;&nbsp;and all those who participated to this and to previous installers.<br />
# &nbsp;&nbsp;Thanks to all.<br />
<br />
## <br />
# SENTORA_CORE/INSTALLER_VERSION<br />
# master - latest unstable<br />
# 2.1.0 - example stable tag<br />
##<br />
<br />
SENTORA_INSTALLER_VERSION="master"<br />
SENTORA_CORE_VERSION="master"<br />
<br />
PANEL_PATH="/etc/sentora"<br />
PANEL_DATA="/var/sentora"<br />
PANEL_CONF="/etc/sentora/configs"<br />
PANEL_UPGRADE=false<br />
<br />
#--- Display the 'welcome' splash/user warning info..<br />
echo ""<br />
echo "############################################################"<br />
echo "#  Welcome to the Official Sentora Installer v.&#36;SENTORA_INSTALLER_VERSION  #"<br />
echo "############################################################"<br />
<br />
echo -e "&#92;nChecking that minimal requirements are ok"<br />
<br />
# Ensure the OS is compatible with the launcher<br />
# leave CentOS code..<br />
if [ -f /etc/centos-release ]; then<br />
    OS="CentOs"<br />
    VERFULL=&#36;(sed 's/^.*release //;s/ (Fin.*&#36;//' /etc/centos-release)<br />
    VER=&#36;{VERFULL:0:1} # return 8<br />
elif [ -f /etc/lsb-release ]; then<br />
    OS=&#36;(grep DISTRIB_ID /etc/lsb-release | sed 's/^.*=//')<br />
    VER=&#36;(grep DISTRIB_RELEASE /etc/lsb-release | sed 's/^.*=//')<br />
elif [ -f /etc/os-release ]; then<br />
    OS=&#36;(grep -w ID /etc/os-release | sed 's/^.*=//')<br />
    VER=&#36;(grep VERSION_ID /etc/os-release | sed 's/^.*"&#92;(.*&#92;)"/&#92;1/')<br />
 else<br />
    OS=&#36;(uname -s)<br />
    VER=&#36;(uname -r)<br />
fi<br />
ARCH=&#36;(uname -m)<br />
<br />
echo "Detected : &#36;OS  &#36;VER  &#36;ARCH"<br />
<br />
if [[ "&#36;OS" = "Bianbu" &amp;&amp; ( "&#36;VER" = "2.0.4" ) ]] ; then<br />
    echo "Ok."<br />
else<br />
    echo "Sorry, this OS is not supported by Sentora." <br />
    exit 1<br />
fi<br />
<br />
# Centos uses repo directory that depends of architecture. Ensure it is compatible<br />
# leave CentOS code..<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#if" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#if</a>
</form> 
         [[ "&#36;OS" = "CentOs" ]] ; then<br />
#    if [[ "&#36;ARCH" == "i386" || "&#36;ARCH" == "i486" || "&#36;ARCH" == "i586" || "&#36;ARCH" == "i686" ]]; then<br />
#        ARCH="i386"<br />
#    elif [[ "&#36;ARCH" != "x86_64" ]]; then<br />
#        echo "Unexpected architecture name was returned (&#36;ARCH ). :-("<br />
#        echo "The installer have been designed for i[3-6]8- and x86_64' architectures. If you"<br />
#        echo " think it may work on your, please report it to the Sentora forum or bugtracker."<br />
#        exit 1<br />
#    fi<br />
#fi<br />
<br />
# Check if the user is 'root' before allowing installation to commence<br />
if [ &#36;UID -ne 0 ]; then<br />
    echo "Install failed: you must be logged in as 'root' to install."<br />
    echo "Use command 'sudo -i', then enter root password and then try again."<br />
    exit 1<br />
fi<br />
<br />
# Check for some common control panels that we know will affect the installation/operating of Sentora.<br />
if [ -e /usr/local/cpanel ] || [ -e /usr/local/directadmin ] || [ -e /usr/local/solusvm/www ] || [ -e /usr/local/home/admispconfig ] || [ -e /usr/local/lxlabs/kloxo ] ; then<br />
    echo "It appears that a control panel is already installed on your server; This installer"<br />
    echo "is designed to install and configure Sentora on a clean OS installation only."<br />
    echo -e "&#92;nPlease re-install your OS before attempting to install using this script."<br />
    exit 1<br />
fi<br />
<br />
# Check for some common packages that we know will affect the installation/operating of Sentora.<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_INSTALLER="apt-get -yqq install"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_REMOVER="apt-get -yqq remove"<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inst() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;dpkg -l "&#36;1" 2&gt; /dev/null | grep '^ii' &amp;&gt; /dev/null<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DB_PCKG="mariadb-server" # changed to mariadb 10.x, as repo has mysql 8<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP_PCKG="apache2"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PHP_PCKG="apache2-mod-php8"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BIND_PCKG="bind9"<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;elif [[ "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_INSTALLER="apt-get -yqq install"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PACKAGE_REMOVER="apt-get -yqq remove"<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inst() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;dpkg -l "&#36;1" 2&gt; /dev/null | grep '^ii' &amp;&gt; /dev/null<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DB_PCKG="default-mysql-server"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP_PCKG="apache2"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PHP_PCKG="apache2-mod-php8"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BIND_PCKG="bind9"<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
  <br />
# Note : Postfix is installed by default on centos netinstall / minimum install.<br />
# The installer seems to work fine even if Postfix is already installed.<br />
# -&gt; The check of postfix is removed, but this comment remains to remember<br />
# only check for sentora installed systems zpanel can now upgrade using this script<br />
if [ -L "/etc/zpanel" ] &amp;&amp; [ -d "/etc/zpanel"  ]; then<br />
    pkginst="n"<br />
    pkginstlist=""<br />
    for package in "&#36;DB_PCKG" "dovecot-mysql" "&#36;HTTP_PCKG" "&#36;PHP_PCKG" "proftpd" "&#36;BIND_PCKG" ; do<br />
        if (inst "&#36;package"); then<br />
            pkginst="y" # At least one package is installed<br />
            pkginstlist="&#36;package &#36;pkginstlist"<br />
        fi<br />
    done<br />
    if [ &#36;pkginst = "y" ]; then<br />
        echo "It appears that the folowing package(s) are already installed:"<br />
        echo "&#36;pkginstlist"<br />
        echo "This installer is designed to install and configure Sentora on a clean OS installation only!"<br />
        echo -e "&#92;nPlease re-install your OS before attempting to install using this script."<br />
        exit 1<br />
    fi<br />
    unset pkginst<br />
    unset pkginstlist<br />
fi<br />
<br />
# *************************************************<br />
#--- Prepare or query informations required to install<br />
<br />
# Update repositories and Install wget and util used to grab server IP<br />
echo -e "&#92;n-- Installing wget and dns utils required to manage inputs"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    apt-get -yqq update &nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#ensure" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#ensure</a>
</form> 
         we can install<br />
    &#36;PACKAGE_INSTALLER dnsutils<br />
fi<br />
&#36;PACKAGE_INSTALLER wget <br />
<br />
extern_ip="&#36;(wget -qO- http://api.sentora.org/ip.txt)"<br />
#local_ip=&#36;(ifconfig eth0 | sed -En 's|.*inet [^0-9]*(([0-9]*&#92;.){3}[0-9]*).*&#36;|&#92;1|p')<br />
local_ip=&#36;(ip addr show | awk '&#36;1 == "inet" &amp;&amp; &#36;3 == "brd" { sub (/&#92;/.*/,""); print &#36;2 }')<br />
<br />
# Enable parameters to be entered on commandline, required for vagrant install<br />
# &nbsp;&nbsp;-d &lt;panel-domain&gt;<br />
# &nbsp;&nbsp;-i &lt;server-ip&gt; (or -i local or -i public, see below)<br />
# &nbsp;&nbsp;-t &lt;timezone-string&gt;<br />
# like :<br />
# &nbsp;&nbsp;sentora_install.sh -t Europe/Paris -d panel.domain.tld -i xxx.xxx.xxx.xxx<br />
# notes:<br />
# &nbsp;&nbsp;-d and -i must be both present or both absent<br />
# &nbsp;&nbsp;-i local  force use of local detected ip<br />
# &nbsp;&nbsp;-i public  force use of public detected ip<br />
# &nbsp;&nbsp;if -t is used without -d/-i, timezone is set from value given and not asked to user<br />
# &nbsp;&nbsp;if -t absent and -d/-i are present, timezone is not set at all<br />
<br />
while getopts d:i:t: opt; do<br />
  case &#36;opt in<br />
  d)<br />
      PANEL_FQDN=&#36;OPTARG<br />
      INSTALL="auto"<br />
      ;;<br />
  i)<br />
      PUBLIC_IP=&#36;OPTARG<br />
      if [[ "&#36;PUBLIC_IP" == "local" ]] ; then<br />
          PUBLIC_IP=&#36;local_ip<br />
      elif [[ "&#36;PUBLIC_IP" == "public" ]] ; then<br />
          PUBLIC_IP=&#36;extern_ip<br />
      fi<br />
      ;;<br />
  t)<br />
      echo "&#36;OPTARG" &gt; /etc/timezone<br />
      tz=&#36;(cat /etc/timezone)<br />
      ;;<br />
  esac<br />
done<br />
if [[ ("&#36;PANEL_FQDN" != "" &amp;&amp; "&#36;PUBLIC_IP" == "") || <br />
      ("&#36;PANEL_FQDN" == "" &amp;&amp; "&#36;PUBLIC_IP" != "") ]] ; then<br />
    echo "-d and -i must be both present or both absent."<br />
    exit 2<br />
fi<br />
<br />
if [[ "&#36;tz" == "" &amp;&amp; "&#36;PANEL_FQDN" == "" ]] ; then<br />
    # Propose selection list for the time zone<br />
    echo "Preparing to select timezone, please wait a few seconds..."<br />
    &#36;PACKAGE_INSTALLER tzdata<br />
    # setup server timezone<br />
    if [[ "&#36;OS" = "CentOs" ]]; then<br />
        # make tzselect to save TZ in /etc/timezone<br />
        echo "echo &#92;&#36;TZ &gt; /etc/timezone" &gt;&gt; /usr/bin/tzselect<br />
        tzselect<br />
        tz=&#36;(cat /etc/timezone)<br />
    elif [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
        dpkg-reconfigure tzdata<br />
        tz=&#36;(cat /etc/timezone)<br />
    fi<br />
fi<br />
# clear timezone information to focus user on important notice<br />
clear<br />
<br />
# Installer parameters<br />
if [[ "&#36;PANEL_FQDN" == "" ]] ; then<br />
    echo -e "&#92;n&#92;e[1;33m=== Informations required to build your server ===&#92;e[0m"<br />
    echo 'The installer requires 2 pieces of information:'<br />
    echo ' 1) the sub-domain that you want to use to access Sentora panel,'<br />
    echo ' &nbsp;&nbsp;- do not use your main domain (like domain.com)'<br />
    echo ' &nbsp;&nbsp;- use a sub-domain, e.g panel.domain.com'<br />
    echo ' &nbsp;&nbsp;- or use the server hostname, e.g server1.domain.com'<br />
    echo ' &nbsp;&nbsp;- DNS must already be configured and pointing to the server IP'<br />
    echo '     &nbsp;&nbsp;for this sub-domain'<br />
    echo ' 2) The public IP of the server.'<br />
    echo ''<br />
<br />
    PANEL_FQDN="&#36;(/bin/hostname)"<br />
    PUBLIC_IP=&#36;extern_ip<br />
    while true; do<br />
        echo ""<br />
        read -r -e -p "Enter the sub-domain you want to access Sentora panel: " -i "&#36;PANEL_FQDN" PANEL_FQDN<br />
<br />
        if [[ "&#36;PUBLIC_IP" != "&#36;local_ip" ]]; then<br />
          echo -e "&#92;nThe public IP of the server is &#36;PUBLIC_IP. Its local IP is &#36;local_ip"<br />
          echo "  For a production server, the PUBLIC IP must be used."<br />
        fi  <br />
        read -r -e -p "Enter (or confirm) the public IP for this server: " -i "&#36;PUBLIC_IP" PUBLIC_IP<br />
        echo ""<br />
<br />
        # Checks if the panel domain is a subdomain<br />
        sub=&#36;(echo "&#36;PANEL_FQDN" | sed -n 's|&#92;(.*&#92;)&#92;..*&#92;..*|&#92;1|p')<br />
        if [[ "&#36;sub" == "" ]]; then<br />
            echo -e "&#92;e[1;31mWARNING: &#36;PANEL_FQDN is not a subdomain!&#92;e[0m"<br />
            confirm="true"<br />
        fi<br />
<br />
        # Checks if the panel domain is already assigned in DNS<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Obsolete now using external source for FQDN to IP. <br />
        #dns_panel_ip=&#36;(host "&#36;PANEL_FQDN"|grep address|cut -d" " -f4) // Obsolete for modern VM's due to hostname setup in /etc/hosts<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dns_panel_ip=&#36;(wget -qO- http://api.sentora.org/hostname.txt?domain="&#36;PANEL_FQDN")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
        if [[ "&#36;dns_panel_ip" == "" ]]; then<br />
            echo -e "&#92;e[1;31mWARNING: &#36;PANEL_FQDN is not defined in your DNS!&#92;e[0m"<br />
            echo "  You must add records in your DNS manager (and then wait until propagation is done)."<br />
            echo "  For more information, read the Sentora documentation:"<br />
            echo " &nbsp;&nbsp;- http://docs.sentora.org/index.php?node=7 (Installing Sentora)"<br />
            echo " &nbsp;&nbsp;- http://docs.sentora.org/index.php?node=51 (Installer questions)"<br />
            echo "  If this is a production installation, set the DNS up as soon as possible."<br />
            confirm="true"<br />
        else<br />
            echo -e "&#92;e[1;32mOK&#92;e[0m: DNS successfully resolves &#36;PANEL_FQDN to &#36;dns_panel_ip"<br />
<br />
            # Check if panel domain matches public IP<br />
            if [[ "&#36;dns_panel_ip" != "&#36;PUBLIC_IP" ]]; then<br />
                echo -e -n "&#92;e[1;31mWARNING: &#36;PANEL_FQDN DNS record does not point to &#36;PUBLIC_IP!&#92;e[0m"<br />
                echo "  Sentora will not be reachable from http://&#36;PANEL_FQDN"<br />
            fi<br />
        fi<br />
<br />
                confirm="true"<br />
        if [[ "&#36;PUBLIC_IP" != "&#36;extern_ip" &amp;&amp; "&#36;PUBLIC_IP" != "&#36;local_ip" ]]; then<br />
            echo -e -n "&#92;e[1;31mWARNING: &#36;PUBLIC_IP does not match detected IP !&#92;e[0m"<br />
            echo "  Sentora will not work with this IP..."<br />
                confirm="true"<br />
        fi<br />
      <br />
        echo ""<br />
        # if any warning, ask confirmation to continue or propose to change<br />
        if [[ "&#36;confirm" != "" ]] ; then<br />
            echo "There are some warnings..."<br />
            echo "Are you really sure that you want to setup Sentora with these parameters?"<br />
            read -r -e -p "(y):Accept and install, (n):Change domain or IP, (q):Quit installer? " yn<br />
            case &#36;yn in<br />
                [Yy]* ) break;;<br />
                [Nn]* ) continue;;<br />
                [Qq]* ) exit;;<br />
            esac<br />
        else<br />
            read -r -e -p "All is ok. Do you want to install Sentora now (y/n)? " yn<br />
            case &#36;yn in<br />
                [Yy]* ) break;;<br />
                [Nn]* ) exit;;<br />
            esac<br />
        fi<br />
    done<br />
fi<br />
<br />
# ***************************************<br />
# Installation really starts here<br />
<br />
echo -e "&#92;n# -------------------------------------------------------------------------------"<br />
<br />
#--- Setup Sentora Admin contact info<br />
<br />
echo -e "&#92;n--- Please Enter vaild contact info for the Sentora system admin or owner below:&#92;n"<br />
<br />
# Get Admin contact info <br />
# ---- Name<br />
while true<br />
do<br />
    read -r -e -p "Enter Full name: " -i "&#36;ADMIN_NAME" ADMIN_NAME<br />
    echo<br />
    if [ -n "&#36;ADMIN_NAME" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# --- Email<br />
while true<br />
do<br />
    read -r -e -p "Enter admin email: " -i "&#36;ADMIN_EMAIL" ADMIN_EMAIL<br />
    echo<br />
    if [[ "&#36;ADMIN_EMAIL" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+&#92;.[a-zA-Z]{2,4}&#36; ]]<br />
    then<br />
        break<br />
    else<br />
        echo "Email address &#36;ADMIN_EMAIL is invalid."<br />
    fi<br />
done<br />
<br />
# ---- Phone Number<br />
while true<br />
do<br />
    read -r -e -p "Enter Phone Number: " -i "&#36;ADMIN_PHONE" ADMIN_PHONE<br />
    echo<br />
    if [ -n "&#36;ADMIN_PHONE" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address<br />
while true<br />
do<br />
    read -r -e -p "Enter Street Address: " -i "&#36;ADMIN_ADDRESS" ADMIN_ADDRESS<br />
    echo<br />
    if [ -n "&#36;ADMIN_ADDRESS" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address - City, State or Province<br />
while true<br />
do<br />
    read -r -e -p "Enter City, State or Province: " -i "&#36;ADMIN_PROVINCE" ADMIN_PROVINCE<br />
    echo<br />
    if [ -n "&#36;ADMIN_PROVINCE" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address - Postal code<br />
while true<br />
do<br />
    read -r -e -p "Enter Postal code: " -i "&#36;ADMIN_POSTALCODE" ADMIN_POSTALCODE<br />
    echo<br />
    if [ -n "&#36;ADMIN_POSTALCODE" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
# ---- Address - Country<br />
while true<br />
do<br />
    read -r -e -p "Enter Country: " -i "&#36;ADMIN_COUNTRY" ADMIN_COUNTRY<br />
    echo<br />
    if [ -n "&#36;ADMIN_COUNTRY" ]<br />
    then<br />
        break<br />
    else<br />
        echo "Entry is Blank. Try again."<br />
    fi<br />
done<br />
<br />
echo -e "&#92;n# -------------------------------------------------------------------------------&#92;n"<br />
<br />
#--- Set custom logging methods so we create a log file in the current working directory.<br />
logfile=&#36;(date +%Y-%m-%d_%H.%M.%S_sentora_install.log)<br />
touch "&#36;logfile"<br />
exec &gt; &gt;(tee "&#36;logfile")<br />
exec 2&gt;&amp;1<br />
<br />
echo "Installer version &#36;SENTORA_INSTALLER_VERSION"<br />
echo "Sentora core version &#36;SENTORA_CORE_VERSION"<br />
echo ""<br />
echo "Installing Sentora &#36;SENTORA_CORE_VERSION at http://&#36;PANEL_FQDN and ip &#36;PUBLIC_IP"<br />
echo "on server under: &#36;OS  &#36;VER  &#36;ARCH"<br />
uname -a<br />
<br />
# Function to disable a file by appending its name with _disabled<br />
disable_file() {<br />
    mv "&#36;1" "&#36;1_disabled_by_sentora" &amp;&gt; /dev/null<br />
}<br />
<br />
#--- AppArmor must be disabled to avoid problems<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    [ -f /etc/init.d/apparmor ]<br />
    if [ &#36;? = "0" ]; then<br />
        echo -e "&#92;n-- Disabling and removing AppArmor, please wait..."<br />
        /etc/init.d/apparmor stop &amp;&gt; /dev/null<br />
        update-rc.d -f apparmor remove &amp;&gt; /dev/null<br />
        apt-get remove -y --purge apparmor* &amp;&gt; /dev/null<br />
        disable_file /etc/init.d/apparmor &amp;&gt; /dev/null<br />
        echo -e "AppArmor has been removed."<br />
    fi<br />
fi<br />
<br />
#--- Adapt repositories and packages sources<br />
#--- Skip this as it messes up the packages. By default, Bianbu has main, restricted, security and updates enabled<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#echo" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#echo</a>
</form> 
         -e "&#92;n-- Updating repositories and packages sources"<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#if" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#if</a>
</form> 
         [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then <br />
    # Update the enabled Aptitude repositories<br />
#    echo -ne "&#92;nUpdating Aptitude Repos: " &gt;/dev/tty<br />
<br />
#    mkdir -p "/etc/apt/sources.list.d.save"<br />
#    cp -R "/etc/apt/sources.list.d/*" "/etc/apt/sources.list.d.save" &amp;&gt; /dev/null<br />
#    rm -rf "/etc/apt/sources.list/*"<br />
#    cp "/etc/apt/sources.list" "/etc/apt/sources.list.save"<br />
<br />
#    if [[ "&#36;VER" = "2.0.4" ]]; then<br />
#        cat &gt; /etc/apt/sources.list &lt;&lt;EOF<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Depots" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Depots</a>
</form> 
         main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu &#36;(lsb_release -sc) main restricted universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security main restricted universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu &#36;(lsb_release -sc)-updates main restricted universe multiverse<br />
#EOF<br />
#    elif [ "&#36;VER" = "12"  ]; then<br />
#        cat &gt; /etc/apt/sources.list &lt;&lt;EOF<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb http://httpredir.debian.org/debian &#36;(lsb_release -sc) main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb-src http://httpredir.debian.org/debian &#36;(lsb_release -sc) main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb http://httpredir.debian.org/debian &#36;(lsb_release -sc)-updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb-src http://httpredir.debian.org/debian &#36;(lsb_release -sc)-updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://security.debian.org/ &#36;(lsb_release -sc)/updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#deb-src http://security.debian.org/ &#36;(lsb_release -sc)/updates main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb http://deb.debian.org/debian-security &#36;(lsb_release -sc)-security main<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deb-src http://deb.debian.org/debian-security &#36;(lsb_release -sc)-security main<br />
#EOF<br />
<br />
 # &nbsp;&nbsp;else<br />
 #     &nbsp;&nbsp;cat &gt; /etc/apt/sources.list &lt;&lt;EOF<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Depots" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Depots</a>
</form> 
         main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security main restricted<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates main restricted<br />
 <br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) main restricted<br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates main restricted<br />
#deb-src http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security main restricted<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Depots" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Depots</a>
</form> 
         Universe Multiverse <br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security universe multiverse<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#deb" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#deb</a>
</form> 
         http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates universe multiverse<br />
<br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc) universe multiverse<br />
#deb-src http://security.ubuntu.com/ubuntu &#36;(lsb_release -sc)-security universe multiverse<br />
#deb-src http://archive.ubuntu.com/ubuntu/ &#36;(lsb_release -sc)-updates universe multiverse<br />
#EOF<br />
#    fi<br />
#fi<br />
<br />
#--- List all already installed packages (may help to debug)<br />
echo -e "&#92;n-- Listing of all packages installed:"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    dpkg --get-selections<br />
fi<br />
<br />
#--- Ensures that all packages are up to date<br />
echo -e "&#92;n-- Updating+upgrading system, it may take some time..."<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    apt-get -yqq update<br />
    apt-get -yqq upgrade<br />
fi<br />
<br />
#--- Install utility packages required by the installer and/or Sentora.<br />
echo -e "&#92;n-- Downloading and installing required tools..."<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER sudo vim make zip unzip debconf-utils at build-essential bash-completion ca-certificates e2fslibs<br />
fi<br />
<br />
#--- Download Sentora archive from GitHub<br />
echo -e "&#92;n-- Downloading Sentora, Please wait, this may take several minutes, the installer will continue after this is complete!"<br />
# Get latest sentora<br />
while true; do<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Sentora REPO<br />
    wget -nv -O sentora_core.zip https://github.com/sentora/sentora-core/archive/&#36;SENTORA_CORE_VERSION.zip<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    if [[ -f sentora_core.zip ]]; then<br />
        break;<br />
    else<br />
        echo "Failed to download sentora core from Github"<br />
        echo "If you quit now, you can run again the installer later."<br />
        read -r -e -p "Press r to retry or q to quit the installer? " resp<br />
        case &#36;resp in<br />
            [Rr]* ) continue;;<br />
            [Qq]* ) exit 3;;<br />
        esac<br />
    fi <br />
done<br />
<br />
###<br />
# Sentora Core Install <br />
###<br />
mkdir -p &#36;PANEL_PATH<br />
mkdir -p &#36;PANEL_DATA<br />
chown -R root:root &#36;PANEL_PATH<br />
unzip -oq sentora_core.zip -d &#36;PANEL_PATH<br />
<br />
#<br />
# Remove PHPUnit module test files (coming soon to the code base).<br />
#<br />
rm -rf &#36;PANEL_PATH/panel/modules/*/tests/<br />
rm -rf &#36;PANEL_PATH/composer.json<br />
rm -rf &#36;PANEL_PATH/composer.lock<br />
<br />
###<br />
# ZPanel Upgrade - Clear down all old code (stops orphaned files)<br />
###<br />
if [ ! -L "/etc/zpanel" ] &amp;&amp; [ -d "/etc/zpanel" ]; then<br />
<br />
    echo -e "Upgrading ZPanelCP 10.1.0 to Sentora v.&#36;SENTORA_CORE_VERSION";<br />
<br />
    PANEL_UPGRADE=true<br />
<br />
    mv /etc/zpanel/configs /root/zpanel_configs_backup<br />
<br />
    ## Move main directories to new sentora location ##<br />
    mv /etc/zpanel/* &#36;PANEL_PATH<br />
    mv /var/zpanel/* &#36;PANEL_DATA<br />
<br />
    rm -rf /etc/zpanel/<br />
    rm -rf /var/zpanel/<br />
<br />
    ## Removing core for upgrade<br />
    rm -rf &#36;PANEL_PATH/panel/bin/<br />
    rm -rf &#36;PANEL_PATH/panel/dryden/<br />
    rm -rf &#36;PANEL_PATH/panel/etc/<br />
    rm -rf &#36;PANEL_PATH/panel/inc/<br />
    rm -rf &#36;PANEL_PATH/panel/index.php<br />
    rm -rf &#36;PANEL_PATH/panel/LICENSE.md<br />
    rm -rf &#36;PANEL_PATH/panel/README.md<br />
    rm -rf &#36;PANEL_PATH/panel/robots.txt<br />
    rm -rf &#36;PANEL_PATH/panel/modules/aliases<br />
    rm -rf &#36;PANEL_PATH/panel/modules/apache_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/backup_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/backupmgr<br />
    rm -rf &#36;PANEL_PATH/panel/modules/client_notices<br />
    rm -rf &#36;PANEL_PATH/panel/modules/cron<br />
    rm -rf &#36;PANEL_PATH/panel/modules/distlists<br />
    rm -rf &#36;PANEL_PATH/panel/modules/dns_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/dns_manager<br />
    rm -rf &#36;PANEL_PATH/panel/modules/domains<br />
    rm -rf &#36;PANEL_PATH/panel/modules/faqs<br />
    rm -rf &#36;PANEL_PATH/panel/modules/forwarders<br />
    rm -rf &#36;PANEL_PATH/panel/modules/ftp_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/ftp_management<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mail_admin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mailboxes<br />
    rm -rf &#36;PANEL_PATH/panel/modules/manage_clients<br />
    rm -rf &#36;PANEL_PATH/panel/modules/manage_groups<br />
    rm -rf &#36;PANEL_PATH/panel/modules/moduleadmin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/my_account<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mysql_databases<br />
    rm -rf &#36;PANEL_PATH/panel/modules/mysql_users<br />
    rm -rf &#36;PANEL_PATH/panel/modules/news<br />
    rm -rf &#36;PANEL_PATH/panel/modules/packages<br />
    rm -rf &#36;PANEL_PATH/panel/modules/parked_domains<br />
    rm -rf &#36;PANEL_PATH/panel/modules/password_assistant<br />
    rm -rf &#36;PANEL_PATH/panel/modules/phpinfo<br />
    rm -rf &#36;PANEL_PATH/panel/modules/phpmyadmin<br />
    rm -rf &#36;PANEL_PATH/panel/modules/phpsysinfo<br />
    rm -rf &#36;PANEL_PATH/panel/modules/services<br />
    rm -rf &#36;PANEL_PATH/panel/modules/shadowing<br />
    rm -rf &#36;PANEL_PATH/panel/modules/sub_domains<br />
    rm -rf &#36;PANEL_PATH/panel/modules/theme_manager<br />
    rm -rf &#36;PANEL_PATH/panel/modules/updates<br />
    rm -rf &#36;PANEL_PATH/panel/modules/usage_viewer<br />
    rm -rf &#36;PANEL_PATH/panel/modules/webalizer_stats<br />
    rm -rf &#36;PANEL_PATH/panel/modules/webmail<br />
    rm -rf &#36;PANEL_PATH/panel/modules/zpanelconfig<br />
    rm -rf &#36;PANEL_PATH/panel/modules/zpx_core_module<br />
<br />
    ###<br />
    # Remove links and files created by installer<br />
    ###<br />
    rm -f /usr/bin/zppy<br />
    rm -f /usr/bin/setso<br />
    rm -f /usr/bin/setzadmin<br />
    <br />
    rm -f /etc/postfix/master.cf<br />
    rm -f /etc/postfix/main.cf<br />
    rm -f /var/spool/vacation/vacation.pl<br />
    rm -f /var/sentora/sieve/globalfilter.sieve<br />
    rm -f /etc/dovecot/dovecot.conf<br />
    rm -f /etc/proftpd.conf<br />
<br />
    mysqlpassword=&#36;(cat /etc/sentora/panel/cnf/db.php | grep "pass" | cut -d &#92;' -f 2);<br />
<br />
    ## Do NOT copy the new cnf directory<br />
    rm -rf "&#36;PANEL_PATH/sentora-core-&#36;SENTORA_CORE_VERSION/cnf"<br />
 <br />
fi<br />
<br />
## cp can be aliased to stop overwriting of files in centos use full path to cp<br />
/bin/cp -rf "&#36;PANEL_PATH/sentora-core-&#36;SENTORA_CORE_VERSION/." "&#36;PANEL_PATH/panel/"<br />
rm sentora_core.zip<br />
<br />
rm -rf &#36;PANEL_PATH/sentora-core-*<br />
rm "&#36;PANEL_PATH/panel/LICENSE.md" "&#36;PANEL_PATH/panel/README.md" "&#36;PANEL_PATH/panel/.gitignore"<br />
rm -rf "&#36;PANEL_PATH/_delete_me" "&#36;PANEL_PATH/.gitignore"<br />
<br />
#--- Set-up Sentora directories and configure permissions<br />
PANEL_CONF="&#36;PANEL_PATH/configs"<br />
<br />
mkdir -p &#36;PANEL_CONF<br />
mkdir -p &#36;PANEL_PATH/docs<br />
mkdir -p &#36;PANEL_DATA/backups<br />
<br />
chmod -R 777 &#36;PANEL_PATH/<br />
chmod -R 777 &#36;PANEL_DATA/<br />
<br />
# Links for compatibility with zpanel access<br />
ln -s &#36;PANEL_PATH /etc/zpanel<br />
ln -s &#36;PANEL_DATA /var/zpanel<br />
<br />
#--- Prepare Sentora executables<br />
chmod +x &#36;PANEL_PATH/panel/bin/zppy <br />
ln -s &#36;PANEL_PATH/panel/bin/zppy /usr/bin/zppy<br />
<br />
chmod +x &#36;PANEL_PATH/panel/bin/setso<br />
ln -s &#36;PANEL_PATH/panel/bin/setso /usr/bin/setso<br />
<br />
chmod +x &#36;PANEL_PATH/panel/bin/setzadmin<br />
ln -s &#36;PANEL_PATH/panel/bin/setzadmin /usr/bin/setzadmin<br />
<br />
#<br />
#--- Install Sentora preconfig<br />
#<br />
while true; do<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Sentora REPO<br />
    wget -nv -O sentora_preconfig.zip https://github.com/sentora/sentora-installers/archive/&#36;SENTORA_INSTALLER_VERSION.zip<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    if [[ -f sentora_preconfig.zip ]]; then<br />
        break;<br />
    else<br />
        echo "Failed to download sentora preconfig from Github"<br />
        echo "If you quit now, you can run again the installer later."<br />
        read -r -e -p "Press r to retry or q to quit the installer? " resp<br />
        case &#36;resp in<br />
            [Rr]* ) continue;;<br />
            [Qq]* ) exit 3;;<br />
        esac<br />
    fi<br />
done<br />
<br />
unzip -oq sentora_preconfig.zip<br />
/bin/cp -rf sentora-installers-&#36;SENTORA_INSTALLER_VERSION/preconf/* &#36;PANEL_CONF<br />
rm -rf sentora_preconfig*<br />
rm -rf sentora-installer*<br />
<br />
#--- Prepare zsudo<br />
cc -o &#36;PANEL_PATH/panel/bin/zsudo &#36;PANEL_CONF/bin/zsudo.c<br />
sudo chown root &#36;PANEL_PATH/panel/bin/zsudo<br />
chmod +s &#36;PANEL_PATH/panel/bin/zsudo<br />
<br />
#--- Resolv.conf protect<br />
chattr -f +i /etc/resolv.conf<br />
<br />
#--- Prepare hostname<br />
old_hostname=&#36;(cat /etc/hostname)<br />
# In file hostname<br />
echo "&#36;PANEL_FQDN" &gt; /etc/hostname<br />
<br />
# In file hosts<br />
sed -i "/127.0.1.1[&#92;t ]*&#36;old_hostname/d" /etc/hosts<br />
sed -i "s|&#36;old_hostname|&#36;PANEL_FQDN|" /etc/hosts<br />
<br />
# For current session<br />
hostname "&#36;PANEL_FQDN"<br />
<br />
#--- Some functions used many times below<br />
# Random password generator function<br />
passwordgen() {<br />
    l=&#36;1<br />
    [ "&#36;l" == "" ] &amp;&amp; l=16<br />
    tr -dc A-Za-z0-9 &lt; /dev/urandom | head -c "&#36;{l}" | xargs<br />
}<br />
<br />
# Add first parameter in hosts file as local IP domain<br />
add_local_domain() {<br />
    if ! grep -q "127.0.0.1 &#36;1" /etc/hosts; then<br />
        echo "127.0.0.1 &#36;1" &gt;&gt; /etc/hosts;<br />
    fi<br />
}<br />
#-----------------------------------------------------------<br />
# Install all softwares and dependencies required by Sentora.<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    # Disable the DPKG prompts before we run the software install to enable fully automated install.<br />
    export DEBIAN_FRONTEND=noninteractive<br />
fi<br />
<br />
##<br />
#--- MySQL<br />
##<br />
echo -e "&#92;n-- Installing MySQL"<br />
&#36;PACKAGE_INSTALLER "&#36;DB_PCKG" ######## This isnt right<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER bsdutils libsasl2-modules-sql libsasl2-modules<br />
    if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        &#36;PACKAGE_INSTALLER db4.7-util<br />
    fi<br />
    MY_CNF_PATH="/etc/mysql/my.cnf"<br />
    DB_SERVICE="mysql"<br />
fi<br />
<br />
service &#36;DB_SERVICE start<br />
<br />
# setup mysql root password only if mysqlpassword is empty<br />
if [ -z "&#36;mysqlpassword" ]; then<br />
    mysqlpassword=&#36;(passwordgen);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Mysql 8+<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '&#36;mysqlpassword';"; 
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#changed" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#changed</a>
</form> 
         as we use mariadb<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elif [[ "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Debian Maria DB 10+<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '&#36;mysqlpassword';";<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
# small cleaning of mysql access<br />
mysql -u root -p"&#36;mysqlpassword" -e "DELETE FROM mysql.user WHERE User='root' AND Host != 'localhost'";<br />
mysql -u root -p"&#36;mysqlpassword" -e "DELETE FROM mysql.user WHERE User=''";<br />
mysql -u root -p"&#36;mysqlpassword" -e "FLUSH PRIVILEGES";<br />
<br />
# remove test table that is no longer used<br />
mysql -u root -p"&#36;mysqlpassword" -e "DROP DATABASE IF EXISTS test";<br />
<br />
# secure SELECT "hacker-code" INTO OUTFILE <br />
sed -i "s|&#92;[mysqld&#92;]|&amp;&#92;nsecure-file-priv = /var/tmp|" &#36;MY_CNF_PATH<br />
<br />
# setup sentora access and core database<br />
if [ &#36;PANEL_UPGRADE == true ]; then<br />
<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-update/zpanel/sql/update-structure.sql<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-update/zpanel/sql/update-data.sql<br />
    <br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_core | mysql -u root -p"&#36;mysqlpassword" -D sentora_core<br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_postfix | mysql -u root -p"&#36;mysqlpassword" -D sentora_postfix<br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_proftpd | mysql -u root -p"&#36;mysqlpassword" -D sentora_proftpd<br />
    mysqldump -u root -p"&#36;mysqlpassword" zpanel_roundcube | mysql -u root -p"&#36;mysqlpassword" -D sentora_roundcube<br />
<br />
    sed -i "s|zpanel_core|sentora_core|" &#36;PANEL_PATH/panel/cnf/db.php<br />
else<br />
    sed -i "s|YOUR_ROOT_MYSQL_PASSWORD|&#36;mysqlpassword|" &#36;PANEL_PATH/panel/cnf/db.php<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_core.sql<br />
fi<br />
# Register mysql/mariadb service for autostart<br />
if [[ "&#36;OS" = "CentOs" ]]; then<br />
    if [[ "&#36;VER" == "7" || "&#36;VER" == "8" ]]; then<br />
        systemctl enable "&#36;DB_SERVICE".service<br />
    else<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         "&#36;DB_SERVICE" on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable "&#36;DB_SERVICE"<br />
    fi<br />
fi<br />
<br />
# NEED TO FIX Bianbu 2.0.4 &amp; Debian 12 SETTING MYSQL-BIND option TO SERVER IP (127.0.0.1) NOT LOCALHOST<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|bind-address = .*|bind-address = 127.0.0.1|" /etc/mysql/mysql.conf.d/mysqld.cnf<br />
fi<br />
<br />
##<br />
#--- Postfix<br />
##<br />
echo -e "&#92;n-- Installing Postfix"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER postfix postfix-mysql<br />
    USR_LIB_PATH="/usr/lib"<br />
fi<br />
<br />
postfixpassword=&#36;(passwordgen);<br />
if [ &#36;PANEL_UPGRADE == false ]; then<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_postfix.sql<br />
fi<br />
<br />
# OLD<br />
## grant will also create users which don't exist and update existing users with password ##<br />
#
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#mysql" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#mysql</a>
</form> 
         -u root -p"&#36;mysqlpassword" -e "GRANT ALL ON sentora_postfix .* TO 'postfix'@'localhost' identified by '&#36;postfixpassword';";<br />
<br />
# Add User for Postfix DB<br />
mysql -u root -p"&#36;mysqlpassword" -e "CREATE USER postfix@localhost IDENTIFIED BY '&#36;postfixpassword';";<br />
# Grant ALL PRIVILEGES to Postfix User<br />
mysql -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_postfix .* TO 'postfix'@'localhost';";<br />
<br />
mkdir &#36;PANEL_DATA/vmail<br />
useradd -r -g mail -d &#36;PANEL_DATA/vmail -s /sbin/nologin -c "Virtual maildir" vmail<br />
chown -R vmail:mail &#36;PANEL_DATA/vmail<br />
chmod -R 770 &#36;PANEL_DATA/vmail<br />
<br />
mkdir -p /var/spool/vacation<br />
useradd -r -d /var/spool/vacation -s /sbin/nologin -c "Virtual vacation" vacation<br />
chown -R vacation:vacation /var/spool/vacation<br />
chmod -R 770 /var/spool/vacation<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Removed" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Removed</a>
</form> 
         optional transport that was leaved empty, until it is fully handled.<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#ln" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#ln</a>
</form> 
         -s &#36;PANEL_CONF/postfix/transport /etc/postfix/transport<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#postmap" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#postmap</a>
</form> 
         /etc/postfix/transport<br />
<br />
add_local_domain "&#36;PANEL_FQDN"<br />
add_local_domain "autoreply.&#36;PANEL_FQDN"<br />
<br />
rm -rf /etc/postfix/main.cf /etc/postfix/master.cf<br />
ln -s &#36;PANEL_CONF/postfix/master.cf /etc/postfix/master.cf<br />
ln -s &#36;PANEL_CONF/postfix/main.cf /etc/postfix/main.cf<br />
ln -s &#36;PANEL_CONF/postfix/vacation.pl /var/spool/vacation/vacation.pl<br />
<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/postfix/*.cf<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/postfix/vacation.conf<br />
# tg - Set default vacation 'from' domain<br />
sed -i "s|!POSTFIX_VACATION!|&#36;PANEL_FQDN|" &#36;PANEL_CONF/postfix/vacation.conf<br />
sed -i "s|!PANEL_FQDN!|&#36;PANEL_FQDN|" &#36;PANEL_CONF/postfix/main.cf<br />
<br />
sed -i "s|!USR_LIB!|&#36;USR_LIB_PATH|" &#36;PANEL_CONF/postfix/master.cf<br />
sed -i "s|!USR_LIB!|&#36;USR_LIB_PATH|" &#36;PANEL_CONF/postfix/main.cf<br />
sed -i "s|!SERVER_IP!|&#36;PUBLIC_IP|" &#36;PANEL_CONF/postfix/main.cf <br />
<br />
VMAIL_UID=&#36;(id -u vmail)<br />
MAIL_GID=&#36;(sed -nr "s/^mail:x:([0-9]+):.*/&#92;1/p" /etc/group)<br />
sed -i "s|!POS_UID!|&#36;VMAIL_UID|" &#36;PANEL_CONF/postfix/main.cf<br />
sed -i "s|!POS_GID!|&#36;MAIL_GID|" &#36;PANEL_CONF/postfix/main.cf<br />
<br />
# remove unusued directives that issue warnings<br />
sed -i '/virtual_mailbox_limit_maps/d' &#36;PANEL_CONF/postfix/main.cf<br />
sed -i '/smtpd_bind_address/d' &#36;PANEL_CONF/postfix/master.cf<br />
<br />
# Register postfix service for autostart (it is automatically started)<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         postfix on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable postfix<br />
    fi<br />
fi<br />
<br />
# Edit deamon_directory in postfix main.cf to fix startup issue.<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|daemon_directory = /usr/lib/postfix|daemon_directory = /usr/lib/postfix/sbin|" &#36;PANEL_CONF/postfix/main.cf<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
##<br />
#--- Dovecot (includes Sieve)<br />
##<br />
echo -e "&#92;n-- Installing Dovecot"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER dovecot-mysql dovecot-imapd dovecot-pop3d dovecot-common dovecot-managesieved dovecot-lmtpd <br />
    sed -i "s|
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#first_valid_uid" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#first_valid_uid</a>
</form> 
         = ?|first_valid_uid = &#36;VMAIL_UID&#92;nlast_valid_uid = &#36;VMAIL_UID&#92;n&#92;nfirst_valid_gid = &#36;MAIL_GID&#92;nlast_valid_gid = &#36;MAIL_GID|" &#36;PANEL_CONF/dovecot2/dovecot.conf<br />
fi<br />
<br />
mkdir -p &#36;PANEL_DATA/sieve<br />
chown -R vmail:mail &#36;PANEL_DATA/sieve<br />
mkdir -p /var/lib/dovecot/sieve/<br />
touch /var/lib/dovecot/sieve/default.sieve<br />
ln -s &#36;PANEL_CONF/dovecot2/globalfilter.sieve &#36;PANEL_DATA/sieve/globalfilter.sieve<br />
<br />
rm -rf /etc/dovecot/dovecot.conf<br />
ln -s &#36;PANEL_CONF/dovecot2/dovecot.conf /etc/dovecot/dovecot.conf<br />
sed -i "s|!POSTMASTER_EMAIL!|postmaster@&#36;PANEL_FQDN|" &#36;PANEL_CONF/dovecot2/dovecot.conf<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/dovecot2/dovecot-dict-quota.conf<br />
sed -i "s|!POSTFIX_PASSWORD!|&#36;postfixpassword|" &#36;PANEL_CONF/dovecot2/dovecot-mysql.conf<br />
sed -i "s|!DOV_UID!|&#36;VMAIL_UID|" &#36;PANEL_CONF/dovecot2/dovecot-mysql.conf<br />
sed -i "s|!DOV_GID!|&#36;MAIL_GID|" &#36;PANEL_CONF/dovecot2/dovecot-mysql.conf<br />
<br />
touch /var/log/dovecot.log /var/log/dovecot-info.log /var/log/dovecot-debug.log<br />
chown vmail:mail /var/log/dovecot*<br />
chmod 660 /var/log/dovecot*<br />
<br />
# Register dovecot service for autostart and start it<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         dovecot on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable dovecot<br />
        /etc/init.d/dovecot start<br />
    fi<br />
fi<br />
<br />
##<br />
#--- Apache server<br />
##<br />
echo -e "&#92;n-- Installing and configuring Apache"<br />
&#36;PACKAGE_INSTALLER "&#36;HTTP_PCKG"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER libapache2-mod-bw<br />
    HTTP_CONF_PATH="/etc/apache2/apache2.conf"<br />
    HTTP_VARS_PATH="/etc/apache2/envvars"<br />
    HTTP_SERVICE="apache2"<br />
    HTTP_USER="www-data"<br />
    HTTP_GROUP="www-data"<br />
    a2enmod rewrite<br />
fi<br />
<br />
if ! grep -q "Include &#36;PANEL_CONF/apache/httpd.conf" "&#36;HTTP_CONF_PATH"; then<br />
    echo "Include &#36;PANEL_CONF/apache/httpd.conf" &gt;&gt; "&#36;HTTP_CONF_PATH";<br />
    ## Remove old include<br />
    if [ &#36;PANEL_UPGRADE == true ]; then<br />
        sed -i "s|Include /etc/zpanel/configs/apache/httpd.conf||" "&#36;HTTP_CONF_PATH";<br />
    fi<br />
fi<br />
add_local_domain "&#36;(hostname)"<br />
<br />
if ! grep -q "apache ALL=NOPASSWD: &#36;PANEL_PATH/panel/bin/zsudo" /etc/sudoers; then<br />
    echo "apache ALL=NOPASSWD: &#36;PANEL_PATH/panel/bin/zsudo" &gt;&gt; /etc/sudoers;<br />
fi<br />
<br />
# Create root directory for public HTTP docs<br />
mkdir -p &#36;PANEL_DATA/hostdata/zadmin/public_html<br />
chown -R &#36;HTTP_USER:&#36;HTTP_GROUP &#36;PANEL_DATA/hostdata/<br />
chmod -R 770 &#36;PANEL_DATA/hostdata/<br />
<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;HTTP_SERVICE' WHERE so_name_vc='httpd_exe'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;HTTP_SERVICE' WHERE so_name_vc='apache_sn'"<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#Set" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#Set</a>
</form> 
         keepalive on (default is off)<br />
sed -i "s|KeepAlive Off|KeepAlive On|" "&#36;HTTP_CONF_PATH"<br />
<br />
# Permissions fix for Apache and ProFTPD (to enable them to play nicely together!)<br />
if ! grep -q "umask 002" "&#36;HTTP_VARS_PATH"; then<br />
    echo "umask 002" &gt;&gt; "&#36;HTTP_VARS_PATH";<br />
fi<br />
<br />
# remove default virtual site to ensure Sentora is the default vhost<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    # disable completely sites-enabled/000-default.conf<br />
    if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        sed -i "s|IncludeOptional sites-enabled|#&amp;|" "&#36;HTTP_CONF_PATH"<br />
    else<br />
        sed -i "s|Include sites-enabled|#&amp;|" "&#36;HTTP_CONF_PATH"<br />
    fi<br />
fi<br />
<br />
# Comment "NameVirtualHost" and Listen directives that are handled in vhosts file<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    sed -i "s|&#92;(Include ports.conf&#92;)|#&#92;1&#92;n# Ports are now handled in Sentora vhosts file|" "&#36;HTTP_CONF_PATH"<br />
    disable_file /etc/apache2/ports.conf<br />
fi<br />
<br />
# adjustments for apache 2.4<br />
if [[ ("&#36;OS" = "Bianbu" &amp;&amp; "&#36;VER" = "2.0.4") || <br />
      ("&#36;OS" = "debian" &amp;&amp; "&#36;VER" = "12") ]] ; then <br />
    # Order deny,allow / Deny from all &nbsp;&nbsp;-&gt;  Require all denied<br />
    sed -i 's|Order deny,allow|Require all denied|I'  &#36;PANEL_CONF/apache/httpd.conf<br />
    sed -i '/Deny from all/d' &#36;PANEL_CONF/apache/httpd.conf<br />
<br />
    # Order allow,deny / Allow from all  -&gt;  Require all granted<br />
    sed -i 's|Order allow,deny|Require all granted|I' &#36;PANEL_CONF/apache/httpd-vhosts.conf<br />
    sed -i '/Allow from all/d' &#36;PANEL_CONF/apache/httpd-vhosts.conf<br />
<br />
    sed -i 's|Order allow,deny|Require all granted|I'  &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
    sed -i '/Allow from all/d' &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
<br />
    # Remove NameVirtualHost that is now without effect and generate warning<br />
    sed -i '/NameVirtualHost/{N;d}' &#36;PANEL_CONF/apache/httpd-vhosts.conf<br />
    sed -i '/# NameVirtualHost is/ {N;N;N;N;N;d}' &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
<br />
    # Options must have ALL (or none) +/- prefix, disable listing directories<br />
    sed -i 's| FollowSymLinks [-]Indexes| +FollowSymLinks -Indexes|' &#36;PANEL_PATH/panel/modules/apache_admin/hooks/OnDaemonRun.hook.php<br />
fi<br />
<br />
#--- Apache+Mod_SSL<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Install Mod_ssl &amp; openssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&#36;PACKAGE_INSTALLER mod_ssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER openssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Activate mod_ssl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a2enmod ssl <br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi <br />
<br />
#############################<br />
##<br />
#--- PHP Install Starts Here<br />
##<br />
echo -e "&#92;n-Installing OS Default PHP version..."<br />
<br />
# Install OS Default PHP version<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER libapache2-mod-php php-common php-bcmath php-cli php-mysql php-gd php-curl php-pear php-imagick php-imap php-xmlrpc php-xsl php-intl php-mbstring php-dev php-zip&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Prepare PHP-mcrypt files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER -y build-essential<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Download needed files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER libmcrypt-dev <br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
##<br />
echo -e "&#92;n-- Configuring PHP..."<br />
##<br />
<br />
# PHP version check (PHP 8.X )<br />
<br />
###<br />
# Check supported OS default PHP 8.X installed before continuing<br />
###<br />
<br />
if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;##### Check PHP 8.x was installed or quit installer.<br />
&nbsp;&nbsp;&nbsp;&nbsp;PHPVERFULL=&#36;(php -r 'echo phpversion();')<br />
&nbsp;&nbsp;&nbsp;&nbsp;PHPVER=&#36;{PHPVERFULL:0:3} # return 8.x<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;nDetected PHP: &#36;PHPVER "<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if  [[ "&#36;PHPVER" == 8.* ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;nPHP &#36;PHPVER installed. Procced installing ..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;nPHP 8.x not installed. &#36;PHPVER installed. Exiting installer. Please contact your script admin!!"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
# Set PHP.ini path**<br />
PHP_INI_PATH="/etc/php/&#36;PHPVER/apache2/php.ini"<br />
<br />
# PHP 8.* Extra packages needed by different OS's<br />
<br />
if [[ "&#36;OS" = "Bianbu" &amp;&amp; ( "&#36;VER" = "2.0.4" ) ||<br />
      "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "12" ) ]] ; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# PHP-mcrypt install code all OS - Check this!!!!!!<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Update Pecl Channels<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n--- Updating PECL Channels..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;pecl channel-update pecl.php.net<br />
&nbsp;&nbsp;&nbsp;&nbsp;pecl update-channels<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Make pear cache folder to stop error "Trying to access array offset on value of type bool in PEAR/REST.php on line 187"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p /tmp/pear/cache<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Install PHP-Mcrypt<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n--- Installing PHP-mcrypt..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -ne '&#92;n' | sudo pecl install mcrypt <br />
<br />
fi<br />
<br />
# Setup PHP mcrypt config files by OS<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create php-mcrypt modules file<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;touch /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 'extension=mcrypt.so' &gt;&gt; /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create links to activate PHP-mcrypt<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/apache2/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/cli/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;elif [[ "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create php-mcrypt modules file<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;touch /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 'extension=mcrypt.so' &gt;&gt; /etc/php/&#36;PHPVER/mods-available/mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Create links to activate PHP-mcrypt<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/apache2/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/&#36;PHPVER/mods-available/mcrypt.ini /etc/php/&#36;PHPVER/cli/conf.d/20-mcrypt.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi<br />
<br />
# Set PHP Memory limit<br />
echo -e "&#92;n-- Setting PHP memory limit to 256MB..."<br />
sed -i "s|memory_limit = .*|memory_limit = 256M|g" &#36;PHP_INI_PATH<br />
<br />
# Setup php upload dir<br />
mkdir -p &#36;PANEL_DATA/temp<br />
chmod 1777 &#36;PANEL_DATA/temp/<br />
chown -R &#36;HTTP_USER:&#36;HTTP_GROUP &#36;PANEL_DATA/temp/<br />
<br />
# Setup php session save directory<br />
mkdir "&#36;PANEL_DATA/sessions"<br />
chown &#36;HTTP_USER:&#36;HTTP_GROUP "&#36;PANEL_DATA/sessions"<br />
chmod 733 "&#36;PANEL_DATA/sessions"<br />
chmod +t "&#36;PANEL_DATA/sessions"<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    sed -i "s|;session.save_path = .*|session.save_path = &#92;"&#36;PANEL_DATA/sessions&#92;"|g" &#36;PHP_INI_PATH<br />
fi<br />
<br />
sed -i "/php_value/d" &#36;PHP_INI_PATH<br />
echo "session.save_path = &#36;PANEL_DATA/sessions;" &gt;&gt; &#36;PHP_INI_PATH<br />
<br />
# setup timezone and upload temp dir<br />
sed -i "s|;date.timezone =|date.timezone = &#36;tz|g" &#36;PHP_INI_PATH<br />
sed -i "s|;upload_tmp_dir =|upload_tmp_dir = &#36;PANEL_DATA/temp/|g" &#36;PHP_INI_PATH<br />
<br />
# Disable php signature in headers to hide it from hackers<br />
sed -i 's|expose_php = On|expose_php = Off|g' &#36;PHP_INI_PATH<br />
<br />
#########################################################################################<br />
<br />
# -------------------------------------------------------------------------------<br />
# Start Snuffleupagus install with lastest version Below<br />
# -------------------------------------------------------------------------------<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
echo -e "&#92;n-- Installing and configuring Snuffleupagus..."<br />
<br />
# Install Snuffleupagus<br />
# Install git<br />
&#36;PACKAGE_INSTALLER git<br />
<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#setup" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#setup</a>
</form> 
         PHP_PERDIR in Snuffleupagus.c in src<br />
mkdir -p /etc/snuffleupagus<br />
cd /etc || exit<br />
<br />
# Clone Snuffleupagus<br />
git clone https://github.com/jvoisin/snuffleupagus<br />
<br />
cd /etc/snuffleupagus/src || exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
sed -i 's|PHP_INI_SYSTEM|PHP_INI_PERDIR|g' snuffleupagus.c<br />
<br />
# Update PCRE - Fix issue with building Snuffleupagus<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ) ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER libpcre3 libpcre3-dev<br />
fi<br />
<br />
# Build Snuffleupagus<br />
phpize<br />
./configure --enable-snuffleupagus<br />
make clean<br />
make<br />
make install<br />
<br />
cd ~ || exit<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ) ]]; then<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Write/create snuffleupagus.rules file <br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# Snuffleupagus needs a blank file to start." &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# OS needs Snuffleupagus(SP) rules disbled for command line by default. Thats why this file is here." &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "####" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# DO NOT ADD CODE HERE. You have been WARNED!!!!!" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "# Adding code here will crash system and add vulnerabilities between vhosts." &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "####" &gt;&gt; /etc/php/"&#36;PHPVER"/snuffleupagus.rules<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Enable Snuffleupagus in PHP.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n Updating Ubuntu &amp; Debian PHP.ini Enabling snuffleupagus..."<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Write default PHP Snuffleupagus.ini <br />
&nbsp;&nbsp;&nbsp;&nbsp;# default code start<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "extension=snuffleupagus.so" &gt;&gt; /etc/php/"&#36;PHPVER"/mods-available/snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "sp.configuration_file=/etc/php/"&#36;PHPVER"/snuffleupagus.rules" &gt;&gt; /etc/php/"&#36;PHPVER"/mods-available/snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Save/link - mods-available/snuffleupagus.ini to conf.d/20-snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;ln -s /etc/php/"&#36;PHPVER"/mods-available/snuffleupagus.ini /etc/php/"&#36;PHPVER"/apache2/conf.d/20-snuffleupagus.ini<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
# Disable PHP EOL message for snuff in apache evrvars file<br />
<br />
# Check if code exists. If not, add it.<br />
ENVVARS_FILE="/etc/apache2/envvars"<br />
ENVVARS_STRING="export SP_SKIP_OLD_PHP_CHECK=1"<br />
<br />
if ! grep -q -F "&#36;ENVVARS_STRING" "&#36;ENVVARS_FILE"; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo 'Apache Snuff Disable PHP EOL Not Found. Adding'<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo '' &gt;&gt; /etc/apache2/envvars<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo '## Hide Snuff PHP EOL warning' &gt;&gt; /etc/apache2/envvars<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo 'export SP_SKIP_OLD_PHP_CHECK=1' &gt;&gt; /etc/apache2/envvars<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
fi<br />
<br />
# Register apache(+php) services for autostart and start it<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         "&#36;HTTP_SERVICE" on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable "&#36;HTTP_SERVICE"<br />
        "/etc/init.d/&#36;HTTP_SERVICE" start<br />
fi<br />
<br />
##<br />
#--- ProFTPd<br />
##<br />
echo -e "&#92;n-- Installing ProFTPD"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER proftpd-mod-mysql<br />
    FTP_CONF_PATH='/etc/proftpd/proftpd.conf'<br />
fi<br />
<br />
# Create and init proftpd database<br />
if [ &#36;PANEL_UPGRADE == false ]; then<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_proftpd.sql<br />
fi<br />
<br />
# Create and configure mysql password for proftpd<br />
proftpdpassword=&#36;(passwordgen);<br />
sed -i "s|!SQL_PASSWORD!|&#36;proftpdpassword|" &#36;PANEL_CONF/proftpd/proftpd-mysql.conf<br />
<br />
# OLD<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#mysql" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#mysql</a>
</form> 
         -u root -p"&#36;mysqlpassword" -e "GRANT ALL ON sentora_proftpd .* TO 'proftpd'@'localhost' identified by '&#36;proftpdpassword';";<br />
<br />
# Add User for Proftpd DB<br />
mysql -u root -p"&#36;mysqlpassword" -e "CREATE USER proftpd@localhost IDENTIFIED BY '&#36;proftpdpassword';";<br />
# Grant ALL PRIVILEGES to Proftpd User<br />
mysql -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_proftpd .* TO 'proftpd'@'localhost';";<br />
<br />
# Assign httpd user and group to all users that will be created<br />
HTTP_UID=&#36;(id -u "&#36;HTTP_USER")<br />
HTTP_GID=&#36;(sed -nr "s/^&#36;HTTP_GROUP:x:([0-9]+):.*/&#92;1/p" /etc/group)<br />
mysql -u root -p"&#36;mysqlpassword" -e "ALTER TABLE sentora_proftpd.ftpuser ALTER COLUMN uid SET DEFAULT &#36;HTTP_UID"<br />
mysql -u root -p"&#36;mysqlpassword" -e "ALTER TABLE sentora_proftpd.ftpuser ALTER COLUMN gid SET DEFAULT &#36;HTTP_GID"<br />
sed -i "s|!SQL_MIN_ID!|&#36;HTTP_UID|" &#36;PANEL_CONF/proftpd/proftpd-mysql.conf<br />
<br />
# Setup proftpd base file to call sentora config<br />
rm -f "&#36;FTP_CONF_PATH"<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#touch" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#touch</a>
</form> 
         "&#36;FTP_CONF_PATH"<br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#echo" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#echo</a>
</form> 
         "include &#36;PANEL_CONF/proftpd/proftpd-mysql.conf" &gt;&gt; "&#36;FTP_CONF_PATH";<br />
ln -s "&#36;PANEL_CONF/proftpd/proftpd-mysql.conf" "&#36;FTP_CONF_PATH"<br />
<br />
# setup proftpd log dir<br />
mkdir -p &#36;PANEL_DATA/logs/proftpd<br />
chmod -R 644 &#36;PANEL_DATA/logs/proftpd<br />
<br />
# Correct bug from package in Ubutu14.04 which screw service proftpd restart<br />
# see https://bugs.launchpad.net/Bianbu/+source/proftpd-dfsg/+bug/1246245<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ) ]]; then<br />
 &nbsp;&nbsp;sed -i "s|&#92;([ &#92;t]*start-stop-daemon --stop --signal &#36;SIGNAL &#92;)&#92;(--quiet --pidfile &#92;"&#36;PIDFILE&#92;"&#92;)&#36;|&#92;1--retry 1 &#92;2|" /etc/init.d/proftpd<br />
fi<br />
<br />
##<br />
#--- BIND<br />
##<br />
echo -e "&#92;n-- Installing and configuring Bind"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER bind9 bind9utils<br />
    BIND_PATH="/etc/bind/"<br />
    BIND_FILES="/etc/bind"<br />
    BIND_SERVICE="bind9"<br />
    BIND_USER="bind"<br />
    mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='/var/sentora/logs/bind/bind.log' WHERE so_name_vc='bind_log'"<br />
fi<br />
<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;BIND_PATH' WHERE so_name_vc='bind_dir'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;BIND_SERVICE' WHERE so_name_vc='bind_service'"<br />
chmod -R 777 &#36;PANEL_CONF/bind/zones/<br />
<br />
# Setup logging directory<br />
mkdir &#36;PANEL_DATA/logs/bind<br />
touch &#36;PANEL_DATA/logs/bind/bind.log &#36;PANEL_DATA/logs/bind/debug.log<br />
chown &#36;BIND_USER &#36;PANEL_DATA/logs/bind/bind.log &#36;PANEL_DATA/logs/bind/debug.log<br />
chmod 660 &#36;PANEL_DATA/logs/bind/bind.log &#36;PANEL_DATA/logs/bind/debug.log<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    mkdir -p /var/named/dynamic<br />
    touch /var/named/dynamic/managed-keys.bind<br />
    chown -R bind:bind /var/named/<br />
    chmod -R 777 &#36;PANEL_CONF/bind/etc<br />
<br />
    chown root:root &#36;BIND_FILES/rndc.key<br />
    chmod 755 &#36;BIND_FILES/rndc.key<br />
fi<br />
<br />
# Some link to enable call from path<br />
ln -s /usr/sbin/named-checkconf /usr/bin/named-checkconf<br />
ln -s /usr/sbin/named-checkzone /usr/bin/named-checkzone<br />
ln -s /usr/sbin/named-compilezone /usr/bin/named-compilezone<br />
<br />
# Setup acl IP to forbid zone transfer<br />
sed -i "s|!SERVER_IP!|&#36;PUBLIC_IP|" &#36;PANEL_CONF/bind/named.conf<br />
<br />
# Build key and conf files<br />
rm -rf &#36;BIND_FILES/named.conf &#36;BIND_FILES/rndc.conf &#36;BIND_FILES/rndc.key<br />
<br />
if [[ "&#36;OS" = "Bianbu" &amp;&amp; ( "&#36;VER" = "2.0.4" ) ||<br />
&nbsp;&nbsp;&nbsp;&nbsp;"&#36;OS" = "debian" &amp;&amp; ( "&#36;VER" = "12" ) ]] ; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Create rndc-key<br />
&nbsp;&nbsp;&nbsp;&nbsp;rndc-confgen -a -A hmac-sha256<br />
fi<br />
<br />
cat &#36;BIND_FILES/rndc.key &#36;PANEL_CONF/bind/named.conf &gt; &#36;BIND_FILES/named.conf<br />
cat &#36;BIND_FILES/rndc.key &#36;PANEL_CONF/bind/rndc.conf &gt; &#36;BIND_FILES/rndc.conf<br />
rm -f &#36;BIND_FILES/rndc.key<br />
<br />
############### - Double check code for Apparmor!!!!<br />
# Ubuntu 22/24.04-Debien Bind9 Fixes ------ HAVE to douable check!!!!!!<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo -e "&#92;n-- Configuring BIND9 fixes"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Disable Bind9(Named) from Apparmor. Apparmor reinstalls with apps(MySQL &amp; Bind9) for some reason.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#ln" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#ln</a>
</form> 
         -s /etc/apparmor.d/usr.sbin.named /etc/apparmor.d/disable/<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#apparmor_parser" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#apparmor_parser</a>
</form> 
         -R /etc/apparmor.d/usr.sbin.named<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
################ - Double check code for Apparmor!!!!<br />
<br />
# Disable Named/bind dnssec-lookaside &amp; dnssec-enable<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;# Bind/Named v.9.10+ or newer.<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|dnssec-lookaside no|#dnssec-lookaside no|g" &#36;BIND_FILES/named.conf<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed -i "s|dnssec-enable yes|#dnssec-enable no|g" &#36;BIND_FILES/named.conf<br />
&nbsp;&nbsp;&nbsp;&nbsp;fi<br />
fi<br />
<br />
##<br />
#--- CRON and ATD<br />
##<br />
echo -e "&#92;n-- Installing and configuring cron tasks"<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
    &#36;PACKAGE_INSTALLER cron<br />
    CRON_DIR="/var/spool/cron/crontabs"<br />
    CRON_SERVICE="cron"<br />
fi<br />
<br />
CRON_USER="&#36;HTTP_USER"<br />
<br />
# prepare daemon crontab<br />
# sed -i "s|!USER!|&#36;CRON_USER|" "&#36;PANEL_CONF/cron/zdaemon" 
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#it" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#it</a>
</form> 
         screw update search!#<br />
sed -i "s|!USER!|root|" "&#36;PANEL_CONF/cron/zdaemon"<br />
cp "&#36;PANEL_CONF/cron/zdaemon" /etc/cron.d/zdaemon<br />
chmod 644 /etc/cron.d/zdaemon<br />
<br />
# prepare user crontabs<br />
CRON_FILE="&#36;CRON_DIR/&#36;CRON_USER"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;CRON_FILE' WHERE so_name_vc='cron_file'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;CRON_FILE' WHERE so_name_vc='cron_reload_path'"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_settings SET so_value_tx='&#36;CRON_USER' WHERE so_name_vc='cron_reload_user'"<br />
{<br />
    echo "SHELL=/bin/bash"<br />
    echo "PATH=/sbin:/bin:/usr/sbin:/usr/bin"<br />
    echo ""<br />
} &gt; mycron<br />
crontab -u &#36;HTTP_USER mycron<br />
rm -f mycron<br />
<br />
chmod 744 "&#36;CRON_DIR"<br />
chown -R &#36;HTTP_USER:&#36;HTTP_USER "&#36;CRON_DIR"<br />
chmod 644 "&#36;CRON_FILE"<br />
<br />
# Register cron and atd services for autostart and start them<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;if [[ "&#36;VER" = "2.0.4" || "&#36;VER" = "12" ]]; then<br />
        
<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#chkconfig" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#chkconfig</a>
</form> 
         crond on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systemctl enable crond<br />
        /etc/init.d/crond start<br />
        /etc/init.d/atd start<br />
    fi<br />
fi<br />
<br />
##<br />
#--- phpMyAdmin<br />
##<br />
echo -e "&#92;n-- Configuring phpMyAdmin"<br />
phpmyadminsecret=&#36;(passwordgen 32);<br />
chmod 644 &#36;PANEL_CONF/phpmyadmin/config.inc.php<br />
sed -i "s|&#92;&#36;cfg&#92;['blowfish_secret'&#92;] &#92;= 'SENTORA';|&#92;&#36;cfg&#92;['blowfish_secret'&#92;] &#92;= '&#36;phpmyadminsecret';|" &#36;PANEL_CONF/phpmyadmin/config.inc.php<br />
ln -s &#36;PANEL_CONF/phpmyadmin/config.inc.php &#36;PANEL_PATH/panel/etc/apps/phpmyadmin/config.inc.php<br />
# Remove phpMyAdmin's setup folder in case it was left behind<br />
rm -rf &#36;PANEL_PATH/panel/etc/apps/phpmyadmin/setup<br />
<br />
##<br />
#--- PHPsysinfo<br />
##<br />
echo -e "&#92;n-- Configuring PHPsysinfo"<br />
# Setup config file<br />
mv -f /etc/sentora/panel/etc/apps/phpsysinfo/phpsysinfo.ini.new /etc/sentora/panel/etc/apps/phpsysinfo/phpsysinfo.ini<br />
<br />
##<br />
#--- Roundcube<br />
##<br />
echo -e "&#92;n-- Configuring Roundcube"<br />
<br />
# Import roundcube default MYSQL table<br />
if [ &#36;PANEL_UPGRADE == false ]; then<br />
    mysql -u root -p"&#36;mysqlpassword" &lt; &#36;PANEL_CONF/sentora-install/sql/sentora_roundcube.sql<br />
fi<br />
<br />
# Create and configure mysql password for roundcube<br />
roundcubepassword=&#36;(passwordgen);<br />
sed -i "s|!ROUNDCUBE_PASSWORD!|&#36;roundcubepassword|" &#36;PANEL_CONF/roundcube/roundcube_config.inc.php<br />
<br />
<br />
# OLD <br />

<form method="post" action="./search.php" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="#mysql" />
<a href="#" class="mytags_hashtag" onclick="document.forms[0].submit()">#mysql</a>
</form> 
         -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_roundcube .* TO 'roundcube'@'localhost' identified by '&#36;roundcubepassword';";<br />
<br />
# Add User for Roundcube DB<br />
mysql -u root -p"&#36;mysqlpassword" -e "CREATE USER roundcube@localhost IDENTIFIED BY '&#36;roundcubepassword';";<br />
# Grant ALL PRIVILEGES to Roundcube User<br />
mysql -u root -p"&#36;mysqlpassword" -e "GRANT ALL PRIVILEGES ON sentora_roundcube .* TO 'roundcube'@'localhost';";<br />
<br />
# Delete Roundcube setup files<br />
rm -r &#36;PANEL_PATH/panel/etc/apps/webmail/SQL<br />
rm -r &#36;PANEL_PATH/panel/etc/apps/webmail/installer<br />
<br />
# Create and configure des key<br />
roundcube_des_key=&#36;(passwordgen 24);<br />
sed -i "s|!ROUNDCUBE_DESKEY!|&#36;roundcube_des_key|" &#36;PANEL_CONF/roundcube/roundcube_config.inc.php<br />
<br />
# Create and configure specials directories and rights<br />
chown "&#36;HTTP_USER:&#36;HTTP_GROUP" "&#36;PANEL_PATH/panel/etc/apps/webmail/temp"<br />
mkdir "&#36;PANEL_DATA/logs/roundcube"<br />
chown "&#36;HTTP_USER:&#36;HTTP_GROUP" "&#36;PANEL_DATA/logs/roundcube"<br />
<br />
# Map config file in roundcube with symbolic links<br />
ln -s &#36;PANEL_CONF/roundcube/roundcube_config.inc.php &#36;PANEL_PATH/panel/etc/apps/webmail/config/config.inc.php<br />
ln -s &#36;PANEL_CONF/roundcube/sieve_config.inc.php &#36;PANEL_PATH/panel/etc/apps/webmail/plugins/managesieve/config.inc.php<br />
<br />
##<br />
#--- Webalizer<br />
##<br />
echo -e "&#92;n-- Configuring Webalizer"<br />
<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;PACKAGE_INSTALLER webalizer<br />
&nbsp;&nbsp;&nbsp;&nbsp;rm -rf /etc/webalizer/webalizer.conf<br />
fi<br />
<br />
#--- Set some Sentora database entries using. setso and setzadmin (require PHP)<br />
echo -e "&#92;n-- Configuring Sentora"<br />
zadminpassword=&#36;(passwordgen);<br />
setzadmin --set "&#36;zadminpassword";<br />
&#36;PANEL_PATH/panel/bin/setso --set sentora_domain "&#36;PANEL_FQDN"<br />
&#36;PANEL_PATH/panel/bin/setso --set server_ip "&#36;PUBLIC_IP"<br />
<br />
# if not release, set beta version in database<br />
if [[ &#36;(echo "&#36;SENTORA_CORE_VERSION" | sed  's|.*-&#92;(beta&#92;).*&#36;|&#92;1|') = "beta"  ]] ; then<br />
    &#36;PANEL_PATH/panel/bin/setso --set dbversion "&#36;SENTORA_CORE_VERSION"<br />
fi<br />
<br />
# Make the daemon to run/build vhosts file.<br />
&#36;PANEL_PATH/panel/bin/setso --set apache_changed "true"<br />
php -q &#36;PANEL_PATH/panel/bin/daemon.php<br />
<br />
##<br />
#--- Firewall ? SHOULD WE???<br />
##<br />
<br />
##<br />
#--- Fail2ban - This should be standard with install. We need a module to help user with settings. Maybe soon!<br />
##<br />
<br />
##<br />
#--- Logrotate<br />
##<br />
<br />
#  Download and install logrotate<br />
echo -e "&#92;n-- Installing Logrotate"<br />
&#36;PACKAGE_INSTALLER logrotate<br />
<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Link the configfiles <br />
ln -s &#36;PANEL_CONF/logrotate/Sentora-apache /etc/logrotate.d/Sentora-apache<br />
ln -s &#36;PANEL_CONF/logrotate/Sentora-proftpd /etc/logrotate.d/Sentora-proftpd<br />
ln -s &#36;PANEL_CONF/logrotate/Sentora-dovecot /etc/logrotate.d/Sentora-dovecot<br />
<br />
#&nbsp;&nbsp;&nbsp;&nbsp;Configure the postrotatesyntax for different OS<br />
if [[ "&#36;OS" = "Bianbu" || "&#36;OS" = "debian" ]]; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;sed -i 's|systemctl reload httpd &gt; /dev/null|/etc/init.d/apache2 reload &gt; /dev/null|' &#36;PANEL_CONF/logrotate/Sentora-apache<br />
&nbsp;&nbsp;&nbsp;&nbsp;sed -i 's|systemctl reload proftpd &gt; /dev/null|/etc/init.d/proftpd force-reload &gt; /dev/null|' &#36;PANEL_CONF/logrotate/Sentora-proftpd<br />
fi<br />
<br />
#--- Resolv.conf deprotect<br />
chattr -i /etc/resolv.conf<br />
<br />
## Leaving this just incase. ***<br />
#--- Restart all services to capture output messages, if any<br />
if [[ "&#36;OS" = "CentOs" ]]; then<br />
    # CentOs does not return anything except redirection to systemctl :-(<br />
    service() {<br />
     &nbsp;&nbsp;echo "Restarting &#36;1"<br />
     &nbsp;&nbsp;systemctl restart "&#36;1.service"<br />
    }<br />
fi<br />
<br />
# Clean up files needed for install/update<br />
# N/A<br />
<br />
echo -e "# -------------------------------------------------------------------------------"<br />
<br />
# Set admin contact info to zadmin profile<br />
<br />
echo -e "&#92;n--- Updating Admin contact Info..."<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_accounts SET ac_email_vc='&#36;ADMIN_EMAIL' WHERE sentora_core.x_accounts.ac_id_pk = 1"<br />
mysql -u root -p"&#36;mysqlpassword" -e "UPDATE sentora_core.x_profiles SET ud_fullname_vc='&#36;ADMIN_NAME', ud_phone_vc='&#36;ADMIN_PHONE', ud_address_tx='&#36;ADMIN_ADDRESS&#92;r&#92;n&#36;ADMIN_PROVINCE &#36;ADMIN_POSTALCODE&#92;r&#92;n&#36;ADMIN_COUNTRY', ud_postcode_vc='&#36;ADMIN_POSTALCODE' WHERE sentora_core.x_profiles.ud_id_pk = 1"<br />
<br />
echo -e "&#92;n--- Done Updating admin contact info.&#92;n"<br />
<br />
echo -e "# -------------------------------------------------------------------------------"<br />
<br />
echo -e "&#92;n--- Restarting Services"<br />
echo -e "Restarting &#36;DB_SERVICE..."<br />
service "&#36;DB_SERVICE" restart<br />
echo -e "Restarting &#36;HTTP_SERVICE..."<br />
service "&#36;HTTP_SERVICE" restart<br />
echo -e "Restarting Postfix..."<br />
service postfix restart<br />
echo -e "Restarting Dovecot..."<br />
service dovecot restart<br />
echo -e "Restarting CRON..."<br />
service "&#36;CRON_SERVICE" restart<br />
echo -e "Restarting Bind9/Named..."<br />
service "&#36;BIND_SERVICE" restart<br />
echo -e "Restarting Proftpd..."<br />
service proftpd restart<br />
echo -e "Restarting ATD..."<br />
service atd restart<br />
<br />
echo -e "&#92;n--- Finished Restarting Services...&#92;n"<br />
<br />
#--- Store the passwords for user reference<br />
{<br />
    echo "Server IP address : &#36;PUBLIC_IP"<br />
    echo "Panel URL       &nbsp;&nbsp;: http://&#36;PANEL_FQDN"<br />
    echo "zadmin Password &nbsp;&nbsp;: &#36;zadminpassword"<br />
    echo ""<br />
    echo "MySQL Root Password      : &#36;mysqlpassword"<br />
    echo "MySQL Postfix Password &nbsp;&nbsp;: &#36;postfixpassword"<br />
    echo "MySQL ProFTPd Password &nbsp;&nbsp;: &#36;proftpdpassword"<br />
    echo "MySQL Roundcube Password : &#36;roundcubepassword"<br />
} &gt;&gt; /root/passwords.txt<br />
chmod 600 /root/passwords.txt<br />
<br />
#--- Advise the admin that Sentora is now installed and accessible.<br />
{<br />
echo "########################################################"<br />
echo " Congratulations Sentora has now been installed on your"<br />
echo " server. Please review the log file left in /root/ for "<br />
echo " any errors encountered during installation."<br />
echo ""<br />
echo " Login to Sentora at http://&#36;PANEL_FQDN"<br />
echo " Sentora Username  : zadmin"<br />
echo " Sentora Password  : &#36;zadminpassword"<br />
echo ""<br />
echo " MySQL Root Password      : &#36;mysqlpassword"<br />
echo " MySQL Postfix Password &nbsp;&nbsp;: &#36;postfixpassword"<br />
echo " MySQL ProFTPd Password &nbsp;&nbsp;: &#36;proftpdpassword"<br />
echo " MySQL Roundcube Password : &#36;roundcubepassword"<br />
echo " &nbsp;&nbsp;(theses passwords are saved in /root/passwords.txt)"<br />
echo "########################################################"<br />
echo ""<br />
} &amp;&gt;/dev/tty<br />
<br />
# Wait until the user have read before restarts the server...<br />
if [[ "&#36;INSTALL" != "auto" ]] ; then<br />
    while true; do<br />
        read -r -e -p "Restart your server now to complete the install (y/n)? " rsn<br />
        case &#36;rsn in<br />
            [Yy]* ) break;;<br />
            [Nn]* ) exit;<br />
        esac<br />
    done<br />
    shutdown -r now<br />
fi</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Ubuntu 24??]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=13102</link>
			<pubDate>Mon, 09 Dec 2024 05:21:40 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=8300">kevwebbie</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=13102</guid>
			<description><![CDATA[Does anyone know if Sentora is able to run on ubuntu 22 - ubuntu 24?? The latest install script om github seems only to support Ubuntu 18. Does anyone know??]]></description>
			<content:encoded><![CDATA[Does anyone know if Sentora is able to run on ubuntu 22 - ubuntu 24?? The latest install script om github seems only to support Ubuntu 18. Does anyone know??]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Opening ports after install?]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=13090</link>
			<pubDate>Mon, 23 Sep 2024 09:18:09 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=8300">kevwebbie</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=13090</guid>
			<description><![CDATA[So I've read the ports one needs to make sure are open after install here <a href="https://docs.sentora.org/?node=40" target="_blank" rel="noopener" class="mycode_url">https://docs.sentora.org/?node=40</a> but do I need to edit the /etc/apache2/apache2.conf file to make sure sentora listens on port 80 and port 443? Is there any information on this that I'm missing?]]></description>
			<content:encoded><![CDATA[So I've read the ports one needs to make sure are open after install here <a href="https://docs.sentora.org/?node=40" target="_blank" rel="noopener" class="mycode_url">https://docs.sentora.org/?node=40</a> but do I need to edit the /etc/apache2/apache2.conf file to make sure sentora listens on port 80 and port 443? Is there any information on this that I'm missing?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mach-hosting downtime explained]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=13075</link>
			<pubDate>Fri, 26 Jul 2024 23:24:07 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=2">TGates</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=13075</guid>
			<description><![CDATA[My zppy repo and my sen-packs repo are both back online! Thanks to @[Jettaman], our main Developer, at DukeCitySolutions.com for hooking me up with hosting.<br />
<br />
I figured I should explain why my server and sites went offline. <br />
<br />
Since I found ZPanel (v1.2 I think) Windows only (incomplete at the time) I have been here since day '2' so to speak. (<a href="https://sentora.org/history" target="_blank" rel="noopener" class="mycode_url">ZPanel/Sentora History</a>) I have had so many home server issues over the years it's incredible. But, this is the first time I had an HDD failure.<br />
<br />
What happened you ask?<br />
I maintain my own server from home. As I have done for many years now. Well, the HDD that held the OS died. <br />
I replaced the drive and started re-installing the OS. Simple fix, just time consuming. Well, nothing is that easy for me. During this process the power supply died.<br />
When it rains, it pours...<br />
<br />
Jettaman set me up an account on one of his Sentora servers so I could get my sites and clients back online. Well, that wasn't as easy as planned either! We had a php session issue and file permission issues.<br />
Jettaman was able to sort those issues out quickly and my sites are back online!<br />
<br />
You may be thinking, TGates uses Sentora and Jettaman uses Sentora, why didn't the sites just 'plug-n-play' on the server? (BTW, my OS was Ubuntu 20.04 and his is also Ubuntu 20.04)<br />
Since the two of us are the only devs, you would think everything would be the same. Nope! His Sentora server is setup to his needs and clients, while mine was setup for my needs and clients. This goes to show how different a Sentora server can be from one install to another. <br />
<br />
What to learn from this?<br />
Have a backup plan for hosting, just in case! Even if its temporary while you rebuild your server. <br />
The most important thing: Back up your hostdata folder locally on your own PC or to a different server! Do not rely on the automated Sentora site backups on your server. If the server HDD fails (like mine did), you are pretty much at a loss.<br />
My server had two HDDs, one HDD hosted the OS and Sentora while the second HDD held my hostdata folder. (Information on how to change the hostdata folder location is in our docs.)<br />
Regardless of your server setup, always download or copy the entire hostdata folder some place safe, at minimum weekly. More active clients/sites should be saved daily.<br />
The built in site backup module also saves MySQL database dumps! This is another important reason to download/save your hostdata folder. Sure, you may have the site on your PC because of editing or whatever, but do you also have a recent DB backup?<br />
<br />
I hope this information will help other's to setup a game plan 'just in case' to protect your sites or client's sites.<br />
<br />
We do have plans to build a Sentora Core backup module. More info on that at another time.]]></description>
			<content:encoded><![CDATA[My zppy repo and my sen-packs repo are both back online! Thanks to @[Jettaman], our main Developer, at DukeCitySolutions.com for hooking me up with hosting.<br />
<br />
I figured I should explain why my server and sites went offline. <br />
<br />
Since I found ZPanel (v1.2 I think) Windows only (incomplete at the time) I have been here since day '2' so to speak. (<a href="https://sentora.org/history" target="_blank" rel="noopener" class="mycode_url">ZPanel/Sentora History</a>) I have had so many home server issues over the years it's incredible. But, this is the first time I had an HDD failure.<br />
<br />
What happened you ask?<br />
I maintain my own server from home. As I have done for many years now. Well, the HDD that held the OS died. <br />
I replaced the drive and started re-installing the OS. Simple fix, just time consuming. Well, nothing is that easy for me. During this process the power supply died.<br />
When it rains, it pours...<br />
<br />
Jettaman set me up an account on one of his Sentora servers so I could get my sites and clients back online. Well, that wasn't as easy as planned either! We had a php session issue and file permission issues.<br />
Jettaman was able to sort those issues out quickly and my sites are back online!<br />
<br />
You may be thinking, TGates uses Sentora and Jettaman uses Sentora, why didn't the sites just 'plug-n-play' on the server? (BTW, my OS was Ubuntu 20.04 and his is also Ubuntu 20.04)<br />
Since the two of us are the only devs, you would think everything would be the same. Nope! His Sentora server is setup to his needs and clients, while mine was setup for my needs and clients. This goes to show how different a Sentora server can be from one install to another. <br />
<br />
What to learn from this?<br />
Have a backup plan for hosting, just in case! Even if its temporary while you rebuild your server. <br />
The most important thing: Back up your hostdata folder locally on your own PC or to a different server! Do not rely on the automated Sentora site backups on your server. If the server HDD fails (like mine did), you are pretty much at a loss.<br />
My server had two HDDs, one HDD hosted the OS and Sentora while the second HDD held my hostdata folder. (Information on how to change the hostdata folder location is in our docs.)<br />
Regardless of your server setup, always download or copy the entire hostdata folder some place safe, at minimum weekly. More active clients/sites should be saved daily.<br />
The built in site backup module also saves MySQL database dumps! This is another important reason to download/save your hostdata folder. Sure, you may have the site on your PC because of editing or whatever, but do you also have a recent DB backup?<br />
<br />
I hope this information will help other's to setup a game plan 'just in case' to protect your sites or client's sites.<br />
<br />
We do have plans to build a Sentora Core backup module. More info on that at another time.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Useful backlink checking site]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=13042</link>
			<pubDate>Sat, 18 May 2024 12:24:43 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=2">TGates</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=13042</guid>
			<description><![CDATA[Useful SEO tool to see what site's (and how many) are sharing your website URL.<br />
<br />
Example backlink stats I figured I'd share from: <a href="https://www.seoreviewtools.com/valuable-backlinks-checker/" target="_blank" rel="noopener" class="mycode_url">https://www.seoreviewtools.com/valuable-...s-checker/</a><br />
<br />
Input URL: <a href="http://sentora.org" target="_blank" rel="noopener" class="mycode_url">sentora.org</a><br />
Links pointing to: <span style="font-weight: bold;" class="mycode_b">domain</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="color: #e82a1f;" class="mycode_color">Note:</span></span><br />
This report is limited to the top backlinks pointing at your domain (<span style="font-style: italic;" class="mycode_i">showing 1 link per domain</span>) <a href="https://semrush.sjv.io/0JgjKE" target="_blank" rel="noopener" class="mycode_url">View all backlinks </a><br />
<br />
2.85M External backlinks Pointing to: domain (Wow!!)<br />
<br />
26 Domain Authority (Score)<br />
<br />
2.9K Referring Domains Pointing to: domain<br />
<br />
2.51K Referring IP's Pointing to: domain]]></description>
			<content:encoded><![CDATA[Useful SEO tool to see what site's (and how many) are sharing your website URL.<br />
<br />
Example backlink stats I figured I'd share from: <a href="https://www.seoreviewtools.com/valuable-backlinks-checker/" target="_blank" rel="noopener" class="mycode_url">https://www.seoreviewtools.com/valuable-...s-checker/</a><br />
<br />
Input URL: <a href="http://sentora.org" target="_blank" rel="noopener" class="mycode_url">sentora.org</a><br />
Links pointing to: <span style="font-weight: bold;" class="mycode_b">domain</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="color: #e82a1f;" class="mycode_color">Note:</span></span><br />
This report is limited to the top backlinks pointing at your domain (<span style="font-style: italic;" class="mycode_i">showing 1 link per domain</span>) <a href="https://semrush.sjv.io/0JgjKE" target="_blank" rel="noopener" class="mycode_url">View all backlinks </a><br />
<br />
2.85M External backlinks Pointing to: domain (Wow!!)<br />
<br />
26 Domain Authority (Score)<br />
<br />
2.9K Referring Domains Pointing to: domain<br />
<br />
2.51K Referring IP's Pointing to: domain]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Interesting find]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=13000</link>
			<pubDate>Sat, 27 Jan 2024 16:15:51 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=2">TGates</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=13000</guid>
			<description><![CDATA[I just scanned through my zppy repo access log and noticed something that surprised me.<br />
Somebody is still using a very old zPanel install!<br />
I saw a zppy request for Zantastico!, the zPanel version of Sentastico.<br />
Sentora came out 10 years ago!<br />
<br />
I just thought I'd share this amusing little tid-bit <img src="https://forums.sentora.org/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" />]]></description>
			<content:encoded><![CDATA[I just scanned through my zppy repo access log and noticed something that surprised me.<br />
Somebody is still using a very old zPanel install!<br />
I saw a zppy request for Zantastico!, the zPanel version of Sentastico.<br />
Sentora came out 10 years ago!<br />
<br />
I just thought I'd share this amusing little tid-bit <img src="https://forums.sentora.org/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Can anyone suggest best Sentora alternative]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12985</link>
			<pubDate>Tue, 19 Dec 2023 03:18:45 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=4536">servermaster</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12985</guid>
			<description><![CDATA[Hello,<br />
<br />
It is undeniable that Sentora and zPanel were once amazing open-source control panels. However, I now observe that they are on a decline, with no updates and lack of support for the latest PHP versions or applications.<br />
<br />
Could anyone kindly suggest the best open-source and free alternative to Sentora? I am looking for a solution that encompasses all the features of Sentora and is regularly updated.<br />
<br />
Thank you.]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
It is undeniable that Sentora and zPanel were once amazing open-source control panels. However, I now observe that they are on a decline, with no updates and lack of support for the latest PHP versions or applications.<br />
<br />
Could anyone kindly suggest the best open-source and free alternative to Sentora? I am looking for a solution that encompasses all the features of Sentora and is regularly updated.<br />
<br />
Thank you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Absolute path to images]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12947</link>
			<pubDate>Wed, 12 Apr 2023 11:39:21 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=274">franmm25</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12947</guid>
			<description><![CDATA[I try show images with absolute path and all time don´t show images, with the same path read directory perfectly with php but don´t show images<br />
<br />
<span style="font-weight: bold;" class="mycode_b">My Example:</span><br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>&lt;img src="/var/sentora/hostdata/zadmin/public_html/website_com/images/image.jpg" /&gt;</blockquote>
<br />
I think the path is right, but the only problem is don´t show images, also read perfectly dir and the number of images inside but don´t show image, i disable open_dir_base for read directory in this domain, but how i tell don´t show images with src.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Thank´s in advanced for the help, regards.</span>]]></description>
			<content:encoded><![CDATA[I try show images with absolute path and all time don´t show images, with the same path read directory perfectly with php but don´t show images<br />
<br />
<span style="font-weight: bold;" class="mycode_b">My Example:</span><br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>&lt;img src="/var/sentora/hostdata/zadmin/public_html/website_com/images/image.jpg" /&gt;</blockquote>
<br />
I think the path is right, but the only problem is don´t show images, also read perfectly dir and the number of images inside but don´t show image, i disable open_dir_base for read directory in this domain, but how i tell don´t show images with src.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Thank´s in advanced for the help, regards.</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Forum SSL && Email problems]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12936</link>
			<pubDate>Sat, 18 Feb 2023 08:43:03 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=6572">republicus</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12936</guid>
			<description><![CDATA[This may not be the most appropriate forum to post this. Its general notice concerning the Sentora forums/website.<br />
<br />
I've been trying to get back here to test Sentora v2 for a while but hit several road blocks that need addressed asap.<br />
<br />
The forum's SSL is invalid. It looks like some letsencrypt/ssl testing was preformed on the forums months ago. Let me know if there is a need for a development lab environment.<br />
<br />
Secondly, I only could gain access to the forums after remembering my email and password while following the crumbs left behind in the email rejections at my mail server sent by the forums. I'm seeing these rejections twice an hour for a quite some time...<br />
<br />
I'm sure both issues are a major impact and reduction of additional eyes on the project.<br />
<br />
<br />
<img src="https://cdn.discordapp.com/attachments/526677428463075344/1076529104318386317/image.png" loading="lazy"  alt="[Image: image.png]" class="mycode_img" />]]></description>
			<content:encoded><![CDATA[This may not be the most appropriate forum to post this. Its general notice concerning the Sentora forums/website.<br />
<br />
I've been trying to get back here to test Sentora v2 for a while but hit several road blocks that need addressed asap.<br />
<br />
The forum's SSL is invalid. It looks like some letsencrypt/ssl testing was preformed on the forums months ago. Let me know if there is a need for a development lab environment.<br />
<br />
Secondly, I only could gain access to the forums after remembering my email and password while following the crumbs left behind in the email rejections at my mail server sent by the forums. I'm seeing these rejections twice an hour for a quite some time...<br />
<br />
I'm sure both issues are a major impact and reduction of additional eyes on the project.<br />
<br />
<br />
<img src="https://cdn.discordapp.com/attachments/526677428463075344/1076529104318386317/image.png" loading="lazy"  alt="[Image: image.png]" class="mycode_img" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Can not access Sentora]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12791</link>
			<pubDate>Sun, 12 Dec 2021 20:53:42 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=20963">ThomasMoss</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12791</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Features to Look for When Creating Logos</span><br />
 <br />
When searching for the <img src="https://lh3.googleusercontent.com/hz5qkQEztY-ecA2OkbyNic-PBdvCUICRVI3Q76CQBl7nZXAZQY7wR5zY-zVm6SFPOE5ljDpOW3TQGc2M2QHABmjLFegG7xfCXEvdPcr4BXr_a7WsiKkgUhh9lB4t0verPF3rygeK" loading="lazy"  alt="[Image: hz5qkQEztY-ecA2OkbyNic-PBdvCUICRVI3Q76CQ...erPF3rygeK]" class="mycode_img" /> <span style="font-weight: bold;" class="mycode_b"><a href="https://www.exibart.com/community/jacktyler/profile/" target="_blank" rel="noopener" class="mycode_url">best embroidery machine for custom designs</a></span> and logos, it's important to take into account a variety of features that can greatly enhance your embroidery experience. This comprehensive blog post will provide an in-depth overview of the top-notch features you should consider when selecting an embroidery machine specifically tailored for designing logos. By delving into these details, you'll be equipped with the knowledge to make an informed decision and find the right embroidery machine that meets your unique needs and delivers exceptional results.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Features to Consider</span><br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Types</span><br />
When choosing an embroidery machine for home use, you'll come across two main types: single-needle and multiple-needle machines.<br />
 <br />
<img src="https://i.imgur.com/CZxbygh.jpg" loading="lazy"  alt="[Image: CZxbygh.jpg]" class="mycode_img" /><br />
 <br />
A single-needle embroidery machine is ideal for beginners or those who primarily work on small projects. It allows you to embroider one color at a time, offering simplicity and ease of use.<br />
On the other hand, a multi-needle embroidery machine is perfect for those who need to embroider intricate designs with multiple colors. With multiple needles, you can thread different colors simultaneously, saving time and effort in changing threads. This type of embroidery machine is commonly used by professionals or those who handle larger and more complex projects.<br />
Consider your needs, skill level, and the scale of your embroidery projects when deciding between these two types of machines.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Hoops/Frames</span><br />
Embroidery frames come in a variety of sizes and shapes, so it's important to select one that is suitable for the job. For projects with large designs, larger frames are recommended to ensure even stitching and better results. On the other hand, for projects with smaller designs or logos, smaller frames are more suitable. Be sure to select a frame that will fit the design and provide enough support for the fabric while being embroidered.<br />
At Crafts Selection, we provide comprehensive reviews and guides to help you select the best embroidery machine for creating logos and custom designs. Whether you're a beginner or an experienced embroiderer, we have the <span style="font-weight: bold;" class="mycode_b"><a href="https://wakelet.com/@topembroiderymachinebrands" target="_blank" rel="noopener" class="mycode_url">best embroidery machine reviews</a></span> <img src="https://i.imgur.com/JxKoW0u.gif" loading="lazy"  alt="[Image: JxKoW0u.gif]" class="mycode_img" /> online to help you make an informed decision. Visit our website for more information!<br />
 <br />
<img src="https://i.imgur.com/ZMHAXm4.jpg" loading="lazy"  alt="[Image: ZMHAXm4.jpg]" class="mycode_img" /><br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Design Software</span><br />
Look for a computerized embroidery machine that has compatible software for designing logos. Make sure the software is easy to use and has features that allow you to customize the design. Many embroidery machines come with compatible software, but you can also purchase third-party software to use with your machine. Research different software options to determine which one best suits your needs and budget. This will ensure that you can create stunning logos and designs with ease.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Speed and Efficiency</span><br />
If you’re looking for a good home embroidery machine that can handle various speed settings and multiple projects with ease, look for one with adjustable speed settings. Some machines may come with presets for different speed levels, so you can easily adjust the speed depending on your project.<br />
Additionally, look for a machine that can handle a large number of stitches quickly and efficiently. This will save you time and effort when working on large projects with intricate designs. Finally, make sure the embroidery machine is easy to use and maintain, so you can get the most out of it.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Cost</span><br />
When budgeting for an embroidery machine, be sure to factor in the cost of the machine, software, and supplies you may need. To find the <img src="https://imgur.com/GAaOGS9.gif" loading="lazy"  alt="[Image: GAaOGS9.gif]" class="mycode_img" /> <span style="font-weight: bold;" class="mycode_b"><a href="https://glose.com/activity/6542196e12930fe1de59ca2d" target="_blank" rel="noopener" class="mycode_url">best affordable embroidery machine</a></span>, it's important to compare different models and features. Research the features of the machine and any software that is included.<br />
Moreover, check for any additional supplies such as needles, thread, and frames that you may need, as these can add to the cost of the machine. With careful research and budgeting, you can find the best embroidery machine for you.]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Features to Look for When Creating Logos</span><br />
 <br />
When searching for the <img src="https://lh3.googleusercontent.com/hz5qkQEztY-ecA2OkbyNic-PBdvCUICRVI3Q76CQBl7nZXAZQY7wR5zY-zVm6SFPOE5ljDpOW3TQGc2M2QHABmjLFegG7xfCXEvdPcr4BXr_a7WsiKkgUhh9lB4t0verPF3rygeK" loading="lazy"  alt="[Image: hz5qkQEztY-ecA2OkbyNic-PBdvCUICRVI3Q76CQ...erPF3rygeK]" class="mycode_img" /> <span style="font-weight: bold;" class="mycode_b"><a href="https://www.exibart.com/community/jacktyler/profile/" target="_blank" rel="noopener" class="mycode_url">best embroidery machine for custom designs</a></span> and logos, it's important to take into account a variety of features that can greatly enhance your embroidery experience. This comprehensive blog post will provide an in-depth overview of the top-notch features you should consider when selecting an embroidery machine specifically tailored for designing logos. By delving into these details, you'll be equipped with the knowledge to make an informed decision and find the right embroidery machine that meets your unique needs and delivers exceptional results.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Features to Consider</span><br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Types</span><br />
When choosing an embroidery machine for home use, you'll come across two main types: single-needle and multiple-needle machines.<br />
 <br />
<img src="https://i.imgur.com/CZxbygh.jpg" loading="lazy"  alt="[Image: CZxbygh.jpg]" class="mycode_img" /><br />
 <br />
A single-needle embroidery machine is ideal for beginners or those who primarily work on small projects. It allows you to embroider one color at a time, offering simplicity and ease of use.<br />
On the other hand, a multi-needle embroidery machine is perfect for those who need to embroider intricate designs with multiple colors. With multiple needles, you can thread different colors simultaneously, saving time and effort in changing threads. This type of embroidery machine is commonly used by professionals or those who handle larger and more complex projects.<br />
Consider your needs, skill level, and the scale of your embroidery projects when deciding between these two types of machines.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Hoops/Frames</span><br />
Embroidery frames come in a variety of sizes and shapes, so it's important to select one that is suitable for the job. For projects with large designs, larger frames are recommended to ensure even stitching and better results. On the other hand, for projects with smaller designs or logos, smaller frames are more suitable. Be sure to select a frame that will fit the design and provide enough support for the fabric while being embroidered.<br />
At Crafts Selection, we provide comprehensive reviews and guides to help you select the best embroidery machine for creating logos and custom designs. Whether you're a beginner or an experienced embroiderer, we have the <span style="font-weight: bold;" class="mycode_b"><a href="https://wakelet.com/@topembroiderymachinebrands" target="_blank" rel="noopener" class="mycode_url">best embroidery machine reviews</a></span> <img src="https://i.imgur.com/JxKoW0u.gif" loading="lazy"  alt="[Image: JxKoW0u.gif]" class="mycode_img" /> online to help you make an informed decision. Visit our website for more information!<br />
 <br />
<img src="https://i.imgur.com/ZMHAXm4.jpg" loading="lazy"  alt="[Image: ZMHAXm4.jpg]" class="mycode_img" /><br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Embroidery Machine Design Software</span><br />
Look for a computerized embroidery machine that has compatible software for designing logos. Make sure the software is easy to use and has features that allow you to customize the design. Many embroidery machines come with compatible software, but you can also purchase third-party software to use with your machine. Research different software options to determine which one best suits your needs and budget. This will ensure that you can create stunning logos and designs with ease.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Speed and Efficiency</span><br />
If you’re looking for a good home embroidery machine that can handle various speed settings and multiple projects with ease, look for one with adjustable speed settings. Some machines may come with presets for different speed levels, so you can easily adjust the speed depending on your project.<br />
Additionally, look for a machine that can handle a large number of stitches quickly and efficiently. This will save you time and effort when working on large projects with intricate designs. Finally, make sure the embroidery machine is easy to use and maintain, so you can get the most out of it.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Cost</span><br />
When budgeting for an embroidery machine, be sure to factor in the cost of the machine, software, and supplies you may need. To find the <img src="https://imgur.com/GAaOGS9.gif" loading="lazy"  alt="[Image: GAaOGS9.gif]" class="mycode_img" /> <span style="font-weight: bold;" class="mycode_b"><a href="https://glose.com/activity/6542196e12930fe1de59ca2d" target="_blank" rel="noopener" class="mycode_url">best affordable embroidery machine</a></span>, it's important to compare different models and features. Research the features of the machine and any software that is included.<br />
Moreover, check for any additional supplies such as needles, thread, and frames that you may need, as these can add to the cost of the machine. With careful research and budgeting, you can find the best embroidery machine for you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Sentora 2.0 Beta]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12748</link>
			<pubDate>Sun, 27 Jun 2021 04:59:04 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=19">Ron-e</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12748</guid>
			<description><![CDATA[Come on guys make it a open beta, i needed 2.0 a long while ago.<br />
This realy takes to long!]]></description>
			<content:encoded><![CDATA[Come on guys make it a open beta, i needed 2.0 a long while ago.<br />
This realy takes to long!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Forums Issue]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12718</link>
			<pubDate>Wed, 26 May 2021 05:11:55 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=20284">JuliaRoss</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12718</guid>
			<description><![CDATA[Hi, I do not know where to write maybe this place will do, but only I have a problem with the forum, I just joined but I see two topics and everything lags, I reloaded the page, even the computer and everything blinks for some reason. What is the problem?  <img src="https://forums.sentora.org/images/smilies/confused.gif" alt="Confused" title="Confused" class="smilie smilie_13" /> <img src="https://forums.sentora.org/images/smilies/dodgy.gif" alt="Dodgy" title="Dodgy" class="smilie smilie_14" />]]></description>
			<content:encoded><![CDATA[Hi, I do not know where to write maybe this place will do, but only I have a problem with the forum, I just joined but I see two topics and everything lags, I reloaded the page, even the computer and everything blinks for some reason. What is the problem?  <img src="https://forums.sentora.org/images/smilies/confused.gif" alt="Confused" title="Confused" class="smilie smilie_13" /> <img src="https://forums.sentora.org/images/smilies/dodgy.gif" alt="Dodgy" title="Dodgy" class="smilie smilie_14" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Migrate zpanel to Sentora]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12103</link>
			<pubDate>Fri, 13 Mar 2020 02:25:06 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=13972">pgh2011</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12103</guid>
			<description><![CDATA[Hi,<br />
<br />
Does anyone have a document or script to migrate zpanel 10.0.2 to Sentora?<br />
I can't find it in the forum.<br />
<br />
Thanks.]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
Does anyone have a document or script to migrate zpanel 10.0.2 to Sentora?<br />
I can't find it in the forum.<br />
<br />
Thanks.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Command to get USB Backup Drive information]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=12101</link>
			<pubDate>Thu, 12 Mar 2020 07:42:12 -0600</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=5033">rsthomas</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=12101</guid>
			<description><![CDATA[1.) From the console, what is the command to display the status of a USB Backup Drive like what is displayed for the main drive with df -h -- size, used, available, etc?<br />
<br />
2.) Please refresh my memory:  If I unplug the USB connection do I need to do anything special command-wise to reinstall it?<br />
<br />
Thanks in advance!]]></description>
			<content:encoded><![CDATA[1.) From the console, what is the command to display the status of a USB Backup Drive like what is displayed for the main drive with df -h -- size, used, available, etc?<br />
<br />
2.) Please refresh my memory:  If I unplug the USB connection do I need to do anything special command-wise to reinstall it?<br />
<br />
Thanks in advance!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Merry Christmas and Happy Holidays!!!!]]></title>
			<link>https://forums.sentora.org/showthread.php?tid=11923</link>
			<pubDate>Tue, 24 Dec 2019 22:26:31 -0700</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.sentora.org/member.php?action=profile&uid=1645">Jettaman</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.sentora.org/showthread.php?tid=11923</guid>
			<description><![CDATA[Merry Christmas and Happy Holidays to all!!!<br />
<br />
I want to thank the Sentora Community for staying strong and patient, while the Sentora Team works on new updates. Hopefully, we will see changes start to happen with Sentora v1.0.4 next year. I also want to thank the Sentora team for all your hard work over the years and helping keep Sentora alive.<br />
<br />
P.S Unofficial Sentora PHP 7.3 support is being developed and will hopefully be available very soon after full penetration testing. Happy Holidays.]]></description>
			<content:encoded><![CDATA[Merry Christmas and Happy Holidays to all!!!<br />
<br />
I want to thank the Sentora Community for staying strong and patient, while the Sentora Team works on new updates. Hopefully, we will see changes start to happen with Sentora v1.0.4 next year. I also want to thank the Sentora team for all your hard work over the years and helping keep Sentora alive.<br />
<br />
P.S Unofficial Sentora PHP 7.3 support is being developed and will hopefully be available very soon after full penetration testing. Happy Holidays.]]></content:encoded>
		</item>
	</channel>
</rss>