mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
bugfix for existring domain bug
This commit is contained in:
parent
cdf891e152
commit
db426ff50d
1 changed files with 7 additions and 7 deletions
|
@ -49,9 +49,9 @@ is_domain_new() {
|
||||||
type="$1"
|
type="$1"
|
||||||
dom=${2-$domain}
|
dom=${2-$domain}
|
||||||
|
|
||||||
web=$(grep "DOMAIN='$dom'" $VESTA/data/users/*/web.conf)
|
web=$(grep -H "DOMAIN='$dom'" $VESTA/data/users/*/web.conf)
|
||||||
dns=$(grep "DOMAIN='$dom'" $VESTA/data/users/*/dns.conf)
|
dns=$(grep -H "DOMAIN='$dom'" $VESTA/data/users/*/dns.conf)
|
||||||
mail=$(grep "DOMAIN='$dom'" $VESTA/data/users/*/mail.conf)
|
mail=$(grep -H "DOMAIN='$dom'" $VESTA/data/users/*/mail.conf)
|
||||||
|
|
||||||
# Check web domain
|
# Check web domain
|
||||||
if [ ! -z "$web" ] && [ "$type" == 'web' ]; then
|
if [ ! -z "$web" ] && [ "$type" == 'web' ]; then
|
||||||
|
@ -101,10 +101,10 @@ is_domain_new() {
|
||||||
# Check web aliases
|
# Check web aliases
|
||||||
web_alias=$(grep -w $dom $VESTA/data/users/*/web.conf)
|
web_alias=$(grep -w $dom $VESTA/data/users/*/web.conf)
|
||||||
if [ ! -z "$web_alias" ]; then
|
if [ ! -z "$web_alias" ]; then
|
||||||
c1=$(grep "'$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
c1=$(grep -H "'$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
||||||
c2=$(grep "'$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
c2=$(grep -H "'$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
||||||
c3=$(grep ",$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
c3=$(grep -H ",$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
||||||
c4=$(grep ",$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
c4=$(grep -H ",$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /)
|
||||||
if [ ! -z "$c1" ] && [ "$type" == "web" ]; then
|
if [ ! -z "$c1" ] && [ "$type" == "web" ]; then
|
||||||
echo "Error: domain $dom exist"
|
echo "Error: domain $dom exist"
|
||||||
log_event "$E_EXISTS" "$EVENT"
|
log_event "$E_EXISTS" "$EVENT"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue