turn off: beta

This commit is contained in:
Usman Nasir
2020-01-03 14:39:22 +05:00
parent 277844b718
commit 7019bf87e3
2 changed files with 37 additions and 32 deletions

View File

@@ -793,7 +793,7 @@ case "$num" in
;; ;;
esac esac
<<COMMENT
echo -e "\nInstall minimal service for CyberPanel? This will skip PowerDNS, Postfix and Pure-FTPd." echo -e "\nInstall minimal service for CyberPanel? This will skip PowerDNS, Postfix and Pure-FTPd."
printf "%s" "Minimal installation [y/N]: " printf "%s" "Minimal installation [y/N]: "
read TMP_YN read TMP_YN
@@ -825,31 +825,35 @@ else
PUREFTPD_VARIABLE="ON" PUREFTPD_VARIABLE="ON"
fi fi
fi fi
COMMENT
#above comment for future use #above comment for future use
#if [[ $DEV_ARG == "ON" ]] ; then #if [[ $DEV_ARG == "ON" ]] ; then
echo -e "Press \e[31mEnter\e[39m to continue with stable version of CyberPanel, or" #echo -e "Press \e[31mEnter\e[39m to continue with stable version of CyberPanel, or"
echo -e "\nPlease enter \e[31mbeta\e[39m and then press \e[31mEnter\e[39m to install CyberPanel with Python 3." #echo -e "\nPlease enter \e[31mbeta\e[39m and then press \e[31mEnter\e[39m to install CyberPanel with Python 3."
echo -e "\nCentOS 8 will autoamtically proceed with Python 3 branch." #echo -e "\nCentOS 8 will autoamtically proceed with Python 3 branch."
printf "%s" "" #printf "%s" ""
read TMP_YN #read TMP_YN
if [[ $TMP_YN == "beta" ]] ; then DEV="ON"
DEV="ON" BRANCH_NAME="p3"
# echo -e "\nPlease specify branch name" echo -e "Branch name set to $BRANCH_NAME"
# printf "%s" ""
# read TMP_YN
BRANCH_NAME="p3"
echo -e "Branch name set to $BRANCH_NAME"
else
DEV="OFF"
if [[ $CENTOS_8 == "True" ]] ; then #if [[ $TMP_YN == "beta" ]] ; then
DEV="ON" # DEV="ON"
BRANCH_NAME="p3" ## echo -e "\nPlease specify branch name"
fi ## printf "%s" ""
fi ## read TMP_YN
# BRANCH_NAME="p3"
# echo -e "Branch name set to $BRANCH_NAME"
#else
# DEV="OFF"
#
# if [[ $CENTOS_8 == "True" ]] ; then
# DEV="ON"
# BRANCH_NAME="p3"
# fi
#fi
@@ -954,12 +958,12 @@ echo -e "Installation will start in 10 seconds, if you wish to stop please press
sleep 10 sleep 10
debug="1" debug="1"
if [[ $debug == "0" ]] ; then if [[ $debug == "0" ]] ; then
echo "/usr/local/CyberPanel/bin/python install.py $SERVER_IP $SERIAL_NO $LICENSE_KEY" echo "/usr/local/CyberPanel/bin/python install.py $SERVER_IP $SERIAL_NO $LICENSE_KEY --postfix $POSTFIX_VARIABLE --powerdns $POWERDNS_VARIABLE --ftp $PUREFTPD_VARIABLE"
exit exit
fi fi
if [[ $debug == "1" ]] ; then if [[ $debug == "1" ]] ; then
/usr/local/CyberPanel/bin/python install.py $SERVER_IP $SERIAL_NO $LICENSE_KEY /usr/local/CyberPanel/bin/python install.py $SERVER_IP $SERIAL_NO $LICENSE_KEY --postfix $POSTFIX_VARIABLE --powerdns $POWERDNS_VARIABLE --ftp $PUREFTPD_VARIABLE
if grep "CyberPanel installation successfully completed" /var/log/installLogs.txt > /dev/null; then if grep "CyberPanel installation successfully completed" /var/log/installLogs.txt > /dev/null; then
echo -e "\nCyberPanel installation sucessfully completed..." echo -e "\nCyberPanel installation sucessfully completed..."

View File

@@ -1958,7 +1958,7 @@ milter_default_action = accept
try: try:
servicePath = '/home/cyberpanel/powerdns' servicePath = '/home/cyberpanel/powerdns'
if state == 'Off': if state == 'off':
command = 'sudo systemctl stop pdns' command = 'sudo systemctl stop pdns'
subprocess.call(shlex.split(command)) subprocess.call(shlex.split(command))
@@ -1984,7 +1984,7 @@ milter_default_action = accept
try: try:
servicePath = '/home/cyberpanel/postfix' servicePath = '/home/cyberpanel/postfix'
if state == 'Off': if state == 'off':
command = 'sudo systemctl stop postfix' command = 'sudo systemctl stop postfix'
subprocess.call(shlex.split(command)) subprocess.call(shlex.split(command))
@@ -2010,7 +2010,7 @@ milter_default_action = accept
try: try:
servicePath = '/home/cyberpanel/pureftpd' servicePath = '/home/cyberpanel/pureftpd'
if state == 'Off': if state == 'off':
command = 'sudo systemctl stop ' + preFlightsChecks.pureFTPDServiceName(distro) command = 'sudo systemctl stop ' + preFlightsChecks.pureFTPDServiceName(distro)
subprocess.call(shlex.split(command)) subprocess.call(shlex.split(command))
@@ -2303,22 +2303,23 @@ def main():
checks.fixCyberPanelPermissions() checks.fixCyberPanelPermissions()
if args.postfix != None: if args.postfix != None:
checks.enableDisableEmail(args.postfix) checks.enableDisableEmail(args.postfix.lower())
else: else:
preFlightsChecks.stdOut("Postfix will be installed and enabled.") preFlightsChecks.stdOut("Postfix will be installed and enabled.")
checks.enableDisableEmail('On') checks.enableDisableEmail('on')
if args.powerdns != None: if args.powerdns != None:
checks.enableDisableDNS(args.powerdns) checks.enableDisableDNS(args.powerdns.lower())
else: else:
preFlightsChecks.stdOut("PowerDNS will be installed and enabled.") preFlightsChecks.stdOut("PowerDNS will be installed and enabled.")
checks.enableDisableDNS('On') checks.enableDisableDNS('on')
if args.ftp != None: if args.ftp != None:
checks.enableDisableFTP(args.ftp, distro) checks.enableDisableFTP(args.ftp.lower(), distro)
else: else:
preFlightsChecks.stdOut("Pure-FTPD will be installed and enabled.") preFlightsChecks.stdOut("Pure-FTPD will be installed and enabled.")
checks.enableDisableFTP('On', distro) checks.enableDisableFTP('on', distro)
checks.installCLScripts() checks.installCLScripts()
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!") logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")