pdnsadmin change
This commit is contained in:
@@ -164,7 +164,7 @@ STATUS(){
|
||||
var2=${NTYPE}_SERVICES_CHECK[@]
|
||||
for srvc in "${!var2}"; do
|
||||
NOGOCHK=true;
|
||||
if [ ${srvc} = "gitea" ] || [ ${srvc} = "powerdns-admin" ]; then
|
||||
if [ ${srvc} = "gitea" ] || [ ${srvc} = "pdnsadmin" ] || [ ${srvc} = "pdnsadmin.socket" ]; then
|
||||
if [[ $($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *10.10.1.120* ]]; then
|
||||
NOGOCHK=false;
|
||||
fi
|
||||
@@ -1163,7 +1163,7 @@ SET-PERMISSIONS(){
|
||||
fi
|
||||
nid=`expr $nid + 1`
|
||||
done
|
||||
elif [ "${1}" = "powerdns-admin" ]; then
|
||||
elif [ "${1}" = "pdnsadmin" ]; then
|
||||
nid=1
|
||||
for nip in "${WEB_HOSTS[@]}"; do
|
||||
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
|
||||
@@ -1515,7 +1515,7 @@ SERVICE(){
|
||||
fi
|
||||
|
||||
NOGOCHK=true;
|
||||
if [ "${1}" == "gitea" ] || [ "${1}" == "powerdns-admin" ]; then
|
||||
if [ "${1}" == "gitea" ] || [ "${1}" == "pdnsadmin" ] || [ "${1}" == "pdnsadmin.socket" ]; then
|
||||
if [[ $($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *10.10.1.120* ]]; then
|
||||
NOGOCHK=false;
|
||||
fi
|
||||
@@ -2000,10 +2000,10 @@ if [ ${action-x} ]; then
|
||||
status-check) STATUS-CHECK ${2};;
|
||||
set-permissions) SET-PERMISSIONS ${2};;
|
||||
service)
|
||||
if [[ ( "$2" = "gitea" ) || ( "$2" = "powerdns-admin" ) ]] && [ "$3" = "start" ]; then
|
||||
if [[ ( "$2" = "giteax" ) || ( "$2" = "powerdns-admin" ) ]] && [ "$3" = "start" ]; then
|
||||
#SET-PERMISSIONS ${2}
|
||||
SERVICE ${2} start
|
||||
elif [[ ( "$2" = "gitea" ) || ( "$2" = "powerdns-admin" ) ]] && [ "$3" = "restart" ]; then
|
||||
elif [[ ( "$2" = "giteax" ) || ( "$2" = "powerdns-admin" ) ]] && [ "$3" = "restart" ]; then
|
||||
SERVICE ${2} stop
|
||||
#SET-PERMISSIONS ${2}
|
||||
SERVICE ${2} start
|
||||
|
||||
Reference in New Issue
Block a user