Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2020-04-03 18:28:27 +0300
committerPaweł Chmielowski <pchmielowski@process-one.net>2020-04-03 18:28:27 +0300
commiteac7e3488ca93495c34a10b72eb7f5bc78c7c9ec (patch)
treebd4bad42da1ccf73bb588c28d64917a2fc0e4d7d /ejabberdctl.template
parent762486d19918ab04862b916493ae6e3672ec6d44 (diff)
Remove bash-izm from ejabberdctl.template introduced recently
Diffstat (limited to 'ejabberdctl.template')
-rwxr-xr-xejabberdctl.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index eca563478..d5b67fb9c 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -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}"