Explorar o código

Fix hanging processes when generate api-key

mzf %!s(int64=9) %!d(string=hai) anos
pai
achega
2fae619bb2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bin/v-generate-api-key

+ 1 - 1
bin/v-generate-api-key

@@ -11,7 +11,7 @@
 
 keygen()
 {
-    cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1
+    < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
 }
 KEYS='/usr/local/vesta/data/keys/'
 HASH=$(keygen)