File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -40,20 +40,21 @@ is_user_suspended
4040# Action #
4141# ----------------------------------------------------------#
4242
43- # Changing user shell
44- update_user_value " $user " ' $SHELL' " $shell "
45-
4643# Get shell full path
4744shell_path=$( /usr/bin/chsh --list-shells | grep -w " $shell " )
4845
4946# Changing passwd file
5047/usr/bin/chsh -s " $shell_path " " $user " > /dev/null 2>&1
5148
5249
50+
5351# ----------------------------------------------------------#
5452# Vesta #
5553# ----------------------------------------------------------#
5654
55+ # Changing user shell
56+ update_user_value " $user " ' $SHELL' " $shell "
57+
5758# Logging
5859log_event ' system' " $V_EVENT "
5960
Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ format_validation() {
6161
6262 # Checking shell
6363 check_shell=$(/usr/bin/chsh --list-shells | grep -w "$val" )
64- if [ -z "$check_shell" ]; then
64+ if [ -z "$1"] || [ -z "$ check_shell" ]; then
6565 echo "Error: shell not found"
66- log_event 'debug' "$E_INVALID $V_EVENT"
67- exit $E_INVALID
66+ log_event 'debug' "$E_NOTEXIST $V_EVENT"
67+ exit $E_NOTEXIST
6868 fi
6969 }
7070
You can’t perform that action at this time.
0 commit comments