We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ac4911 commit ed0b008Copy full SHA for ed0b008
bin/v-change-user-password
@@ -25,10 +25,17 @@ source $HESTIA/conf/hestia.conf
25
# Verifications #
26
#----------------------------------------------------------#
27
28
-check_args '2' "$#" 'USER PASSWORD'
+check_args '1' "$#" 'USER [PASSWORD]'
29
is_format_valid 'user'
30
is_object_valid 'user' 'USER' "$user"
31
is_object_unsuspended 'user' 'USER' "$user"
32
+
33
+# Non-interactive (stdin not opened)
34
+[[ -z "$password" && ! -t 0 ]] && read -r password
35
36
+# Password prompt
37
+[[ -z "$password" ]] && read -r -s -p "Password:" password
38
39
is_password_valid
40
41
# Perform verification if read-only mode is enabled
0 commit comments