🐛 prohibit clientmgmt commands before init is done
This commit is contained in:
parent
49a12e960c
commit
9ef9efb1a6
13
clientmgmt
13
clientmgmt
@ -363,19 +363,32 @@ clientmgmt_clientlist(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# HELPER: Make sure config and key files have been fully initialized.
|
||||||
|
#
|
||||||
|
clientmgmt_check_init_done(){
|
||||||
|
[[ -f "${DATA_SERVER_DIR}/server.conf" ]] && return 0
|
||||||
|
log_error "Server is still initializing config and key files; try again in a few seconds"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## MAIN ##
|
## MAIN ##
|
||||||
case ${1:-""} in
|
case ${1:-""} in
|
||||||
add)
|
add)
|
||||||
|
clientmgmt_check_init_done
|
||||||
clientmgmt_add
|
clientmgmt_add
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
list)
|
list)
|
||||||
|
clientmgmt_check_init_done
|
||||||
clientmgmt_list
|
clientmgmt_list
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
revoke)
|
revoke)
|
||||||
|
clientmgmt_check_init_done
|
||||||
clientmgmt_revoke
|
clientmgmt_revoke
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user