delete vesta user

This commit is contained in:
Serghey Rodin 2011-08-25 23:59:26 +03:00
commit 9e921c48be
8 changed files with 415 additions and 1 deletions

View file

@ -591,3 +591,12 @@ ipint_shell_list() {
echo "$interface"
done
}
ip_owner_search(){
for ip in $(ls $V_IPS/); do
check_owner=$(grep "OWNER='$user'" $V_IPS/$ip)
if [ ! -z "$check_owner" ]; then
echo "$ip"
fi
done
}

View file

@ -973,6 +973,21 @@ decrease_user_value() {
fi
}
is_user_parent() {
childs="$(grep "U_CHILDS=" $V_USERS/$user/user.conf |cut -f 2 -d \')"
if [ -z "$childs" ]; then
echo "Error: Parsing error"
log_event 'debug' "$E_PARSE_ERROR $V_EVENT"
exit $E_PARSE_ERROR
fi
if [ "$childs" -gt '0' ]; then
echo "Error: user have childs"
log_event 'debug' "$E_CHILD_EXIST $V_EVENT"
exit $E_CHILD_EXIST
fi
}
# Json listing function
v_json_list() {
# Definigng variables