Patchs editions/suppression
This commit is contained in:
parent
3ebb221993
commit
46510d79e5
|
@ -439,10 +439,6 @@ src/fixperms.sh -text
|
|||
src/functions.sh -text
|
||||
src/functions_dns.sh -text
|
||||
src/functions_hosting.sh -text
|
||||
src/hosting_functions/hosting_panel.sh -text
|
||||
src/hosting_functions/hosting_redirect.sh -text
|
||||
src/hosting_functions/hosting_vhost.sh -text
|
||||
src/hosting_functions/hosting_webmail.sh -text
|
||||
src/mail_add -text
|
||||
src/mail_del -text
|
||||
src/mem_add -text
|
||||
|
|
|
@ -900,7 +900,7 @@ class m_dom {
|
|||
return false;
|
||||
} else {
|
||||
// OK, on valide :
|
||||
$db->query("delete from sub_domaines where domaine='$dom' and sub='$sub' and type='$type' and ( length('$value')=0 or valeur='$value') ");
|
||||
$db->query("update sub_domaines set web_action='DELETE' where domaine='$dom' and sub='$sub' and type='$type' and ( length('$value')=0 or valeur='$value') ");
|
||||
$db->query("update domaines set dns_action='UPDATE' where domaine='$dom';");
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -11,6 +11,8 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
|
|||
AddHandler cgi-script .cgi
|
||||
</Directory>
|
||||
|
||||
Include /var/alternc/apache-vhost/vhosts_all.conf
|
||||
|
||||
<VirtualHost *:80>
|
||||
# ***ALTERNC_ALIASES***
|
||||
Alias /icons/ /usr/share/apache/icons/
|
||||
|
@ -46,4 +48,3 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
|
|||
</Directory>
|
||||
|
||||
Include /etc/alternc/bureau.conf
|
||||
Include /var/alternc/apache-vhost/vhosts_all.conf
|
||||
|
|
|
@ -92,7 +92,7 @@ host_create() {
|
|||
# Check if all is right in the conf file
|
||||
# If not, put a debug message
|
||||
local ISNOTGOOD=$(grep "%%" "$TMP_FILE")
|
||||
[ "$ISNOTGOOD" ] && (echo "# There was a probleme in the generation : $ISNOTGOOD" > "$TMP_FILE" )
|
||||
[ "$ISNOTGOOD" ] && (echo "# There was a probleme in the generation : $ISNOTGOOD" > "$TMP_FILE" ; return 44 )
|
||||
|
||||
# Put the conf file in prod
|
||||
mkdir -p "$(dirname "$FILE_TARGET")"
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
host_create_panel() {
|
||||
|
||||
if [[ ( -z $1 ) || (-z $2 ) ]]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "création panel $1"
|
||||
|
||||
local USER=$1
|
||||
local FQDN=$2
|
||||
local TEMPLATE="panel.conf"
|
||||
local TARGET=$HOST_DIR"/"$USER"/"$FQDN
|
||||
host_prepare_conf $TEMPLATE #Return #HOST_TMP
|
||||
|
||||
sed -i \
|
||||
-e "s#%%fqdn%%#$FQDN#g" \
|
||||
$HOST_TMP
|
||||
|
||||
host_save_conf $HOST_TMP $TARGET
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
host_create_redirect() {
|
||||
|
||||
if [[ ( -z $1 ) || (-z $2 ) || ( -z $3) ]]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "création redirection pour $1 de $2 vers $3"
|
||||
|
||||
local USER=$1
|
||||
local FQDN=$2
|
||||
local REDIRECT=$3
|
||||
local TEMPLATE="redirect.conf"
|
||||
local TARGET=$HOST_DIR"/"$USER"/"$FQDN
|
||||
host_prepare_conf $TEMPLATE #Return #HOST_TMP
|
||||
|
||||
sed -i \
|
||||
-e "s#%%fqdn%%#${FQDN}#g" \
|
||||
-e "s#%%redirect%%#${REDIRECT}#g" \
|
||||
$HOST_TMP
|
||||
|
||||
host_save_conf $HOST_TMP $TARGET
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
host_create_vhost() {
|
||||
|
||||
if [[ ( -z $1 ) || (-z $2 ) || ( -z $3) ]]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "création vhost $1 pour $2, repertoire $3"
|
||||
|
||||
local USER=$1
|
||||
local FQDN=$2
|
||||
local TEMPLATE="vhost.conf"
|
||||
local TARGET=$HOST_DIR"/"$USER"/"$FQDN
|
||||
|
||||
local domain_letter=`print_domain_letter "$domain"`
|
||||
local user_letter=`print_user_letter "$user"`
|
||||
local DIRECTORY=${HTML_HOME}/${user_letter}/${user}$3
|
||||
|
||||
host_prepare_conf $TEMPLATE #Return #HOST_TMP
|
||||
|
||||
sed -i \
|
||||
-e "s#%%fqdn%%#$FQDN#g" \
|
||||
-e "s#%%document_root%%#$DIRECTORY#g" \
|
||||
$HOST_TMP
|
||||
|
||||
host_save_conf $HOST_TMP $TARGET
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
host_create_webmail() {
|
||||
|
||||
if [[ ( -z $1 ) || (-z $2 ) ]]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "création webmail $1 pour $2"
|
||||
|
||||
local USER=$1
|
||||
local FQDN=$2
|
||||
local TEMPLATE="webmail.conf"
|
||||
local TARGET=$HOST_DIR"/"$USER"/"$FQDN
|
||||
host_prepare_conf $TEMPLATE #Return #HOST_TMP
|
||||
|
||||
sed -i \
|
||||
-e "s#%%fqdn%%#$FQDN#g" \
|
||||
$HOST_TMP
|
||||
|
||||
host_save_conf $HOST_TMP $TARGET
|
||||
}
|
|
@ -41,14 +41,14 @@ touch "$LOCK_FILE"
|
|||
# set sub_domaines.web_action = delete where domaines.dns_action = DELETE
|
||||
$MYSQL_DO "update sub_domaines sd, domaines d set sd.web_action = 'DELETE' where sd.domaine = d.domaine and sd.compte=d.compte and d.dns_action = 'DELETE';"
|
||||
|
||||
# Sub_domaines we want to delete
|
||||
# Sub_domaines we want to delete
|
||||
# sub_domaines.web_action = delete
|
||||
for sub in $( $MYSQL_DO "select concat_ws('$B',if(length(sd.sub)>0,concat_ws('.',sd.sub,sd.domaine),sd.domaine),sd.type) from sub_domaines sd where web_action ='DELETE';") ; do
|
||||
host_delete $(echo $sub|tr "$B" ' ')
|
||||
# TODO Update the entry in the DB with the result and the action
|
||||
$MYSQL_DO "delete from sub_domaines where concat_ws('$B',if(length(sub)>0,concat_ws('.',sub,domaine),domaine),type) = '$sub' and web_action ='DELETE';"
|
||||
done
|
||||
|
||||
# Sub domaines we want to update
|
||||
# Sub domaines we want to update
|
||||
# sub_domaines.web_action = update and sub_domains.only_dns = false
|
||||
params=$( $MYSQL_DO "
|
||||
select concat_ws('$B',lower(sd.type), if(length(sd.sub)>0,concat_ws('.',sd.sub,sd.domaine),sd.domaine), valeur)
|
||||
|
@ -90,7 +90,7 @@ done
|
|||
# domaines.dns_action = DELETE
|
||||
for dom in $( $MYSQL_DO "select domaine from domaines where dns_action = 'DELETE';") ; do
|
||||
dns_delete $dom
|
||||
# Web configurations have already bean cleaned previously
|
||||
# Web configurations have already bean cleaned previously
|
||||
$MYSQL_DO "delete sub_domaines where domaine='$dom'; delete domaines where domaine='$dom';"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue