mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
delete vesta user
This commit is contained in:
parent
27a59703a0
commit
9e921c48be
8 changed files with 415 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue