mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
optimized domain function usage
This commit is contained in:
parent
1211690d06
commit
b4775368cb
3 changed files with 10 additions and 35 deletions
|
@ -40,7 +40,7 @@ is_domain_suspended() {
|
|||
|
||||
# Checking result
|
||||
if [ ! -z "$check_domain" ]; then
|
||||
echo "Error: domain suspended"
|
||||
echo "Error: domain $domain is suspended"
|
||||
log_event 'debug' "$E_SUSPENDED $V_EVENT"
|
||||
exit $E_SUSPENDED
|
||||
fi
|
||||
|
@ -409,34 +409,6 @@ del_web_config() {
|
|||
sed -i "$top_line,$bottom_line d" $conf
|
||||
}
|
||||
|
||||
del_dns_domain() {
|
||||
conf="$V_USERS/$user/dns.conf"
|
||||
|
||||
# Parsing domains
|
||||
string=$( grep -n "DOMAIN='$domain'" $conf | cut -f 1 -d : )
|
||||
if [ -z "$string" ]; then
|
||||
echo "Error: parse error"
|
||||
log_event 'debug' "$E_PARSING $V_EVENT"
|
||||
exit $E_PARSING
|
||||
fi
|
||||
sed -i "$string d" $conf
|
||||
rm -f $V_USERS/$user/dns/$domain
|
||||
}
|
||||
|
||||
del_web_domain() {
|
||||
conf="$V_USERS/$user/web.conf"
|
||||
|
||||
# Parsing domains
|
||||
string=$( grep -n "DOMAIN='$domain'" $conf | cut -f 1 -d : )
|
||||
if [ -z "$string" ]; then
|
||||
echo "Error: parse error"
|
||||
log_event 'debug' "$E_PARSING $V_EVENT"
|
||||
exit $E_PARSING
|
||||
fi
|
||||
sed -i "$string d" $conf
|
||||
}
|
||||
|
||||
|
||||
dom_clear_search(){
|
||||
# Defining delimeter
|
||||
IFS=$'\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue