Remove bash-izm from ejabberdctl.template introduced recently

This commit is contained in:
Paweł Chmielowski 2020-04-03 17:28:27 +02:00
parent 762486d199
commit eac7e3488c
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ uid()
uuid=$(uuidgen 2>/dev/null)
[ -z "$uuid" ] && [ -f /proc/sys/kernel/random/uuid ] && uuid=$(cat /proc/sys/kernel/random/uuid)
[ -z "$uuid" ] && uuid=$(printf "%X" "${RANDOM:-$$}$(date +%M%S)")
uuid=${uuid:0:3}
uuid=$(printf '%s' $uuid | sed 's/^\(...\).*$/\1/')
[ $# -eq 0 ] && echo "${uuid}-${ERLANG_NODE}"
[ $# -eq 1 ] && echo "${uuid}-${1}-${ERLANG_NODE}"
[ $# -eq 2 ] && echo "${uuid}-${1}@${2}"