Nowe da_cli,sg

This commit is contained in:
Marek Miklewicz
2024-10-29 09:02:28 +01:00
parent b8ab53819a
commit 2423468758
2 changed files with 28 additions and 638 deletions
+28 -11
View File
@@ -1,15 +1,17 @@
#!/bin/bash
#version 0.8.0
#version 0.9.0
#gedas@mc2.dev
### VARS ###
DEFAULTPACKAGE=NO-LIMIT
DNSMASTER="192.168.8.13" # IP address of this server that should be used on the client host for multiserver
DNSSLAVE="192.168.8.14" # the second DNS server. This server should be able to login to DNSSLAVE via ssh
DEFAULTPACKAGE=NO_LIMIT
DNSMASTER="185.242.132.100" # IP address of this server that should be used on the client host for multiserver
DNSSLAVE="193.178.43.30" # the second DNS server. This server should be able to login to DNSSLAVE via ssh
DNSSLAVEPORT="22" # port for dnsslave
ADMINUSER="admin" # server main admin user
TRUSTED_IPS="127.0.0.1,185.242.134.92,185.242.134.93,185.242.134.94,193.177.165.192,193.177.165.193,193.177.165.194,193.177.165.195,193.177.165.196" #comma separated list of IP addresses
TRUSTED_IPS="127.0.0.1,185.242.134.92,185.242.134.93,185.242.134.94,193.177.165.192,193.177.165.193,193.177.165.194,193.177.165.195,193.177.165.196" #comma s
eparated list of IP addresses
### END VARS ###
######### FUNCTIONS
createUser() {
@@ -885,10 +887,15 @@ phpList () {
fi
fi
PHP1=$(grep -e "^php1_release=" "${CBOPTIONS}" | cut -f2 -d=)
PHP2=$(grep -e "^php2_release=" "${CBOPTIONS}" | cut -f2 -d=)
PHP3=$(grep -e "^php3_release=" "${CBOPTIONS}" | cut -f2 -d=)
PHP4=$(grep -e "^php4_release=" "${CBOPTIONS}" | cut -f2 -d=)
PHP1=$(grep -m1 -e ^php1_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP2=$(grep -m1 -e ^php2_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP3=$(grep -m1 -e ^php3_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP4=$(grep -m1 -e ^php4_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP5=$(grep -m1 -e ^php5_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP6=$(grep -m1 -e ^php6_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP7=$(grep -m1 -e ^php7_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP8=$(grep -m1 -e ^php8_release= "${CBOPTIONS}" | cut -f2 -d=)
PHP9=$(grep -m1 -e ^php9_release= "${CBOPTIONS}" | cut -f2 -d=)
if [[ ${EXPORT} -eq 0 ]]; then
printf "%-16s %-30s\t%s\n" "USER" "DOMAIN" "PHP"
@@ -906,7 +913,17 @@ phpList () {
for USER in ${USERSLIST}; do
for DOMAIN in `cat ${USERSDATA}/${USER}/domains.list`; do
PHPVER=`grep -E "^php1_select=" ${USERSDATA}/${USER}/domains/${DOMAIN}.conf | cut -f2 -d=`
if [[ ${PHPVER} -eq 4 ]]; then
if [[ ${PHPVER} -eq 9 ]]; then
PHPSELECTED=${PHP9}
elif [[ ${PHPVER} -eq 8 ]]; then
PHPSELECTED=${PHP8}
elif [[ ${PHPVER} -eq 7 ]]; then
PHPSELECTED=${PHP7}
elif [[ ${PHPVER} -eq 6 ]]; then
PHPSELECTED=${PHP6}
elif [[ ${PHPVER} -eq 5 ]]; then
PHPSELECTED=${PHP5}
elif [[ ${PHPVER} -eq 4 ]]; then
PHPSELECTED=${PHP4}
elif [[ ${PHPVER} -eq 3 ]]; then
PHPSELECTED=${PHP3}
@@ -970,7 +987,7 @@ phpSet () {
for DOMAIN in ${DOMAINLIST}; do
if [[ -z ${PHPVER} ]]; then
printf "\nDOMAIN: %s - PHP version \"%s\" does not exist. Available versions: " "${DOMAIN}" "${PHPSELECTED}"
grep -e "^php._release=" ${CBOPTIONS} | xargs
grep -e "^php._release=" ${CBOPTIONS} | grep -v _release=no | xargs
break
fi
PHPSELECT_JSON=$(cat <<- EOF