aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahooinc.com>2021-12-11 18:59:53 +0100
committerTor Egge <Tor.Egge@yahooinc.com>2021-12-11 18:59:53 +0100
commit344cad083003b33384439476e6e4d70fee6b6917 (patch)
tree3075e089b05efc2ff0acedfa572a8a8be1d3ee93 /container-disc
parentecedc44c8182492dae1f128d7e73f6272e6bcc32 (diff)
Use md5 command instead of md5sum on darwin.
Diffstat (limited to 'container-disc')
-rwxr-xr-xcontainer-disc/src/main/sh/vespa-start-container-daemon.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/container-disc/src/main/sh/vespa-start-container-daemon.sh b/container-disc/src/main/sh/vespa-start-container-daemon.sh
index eb446f9a251..5d47392292d 100755
--- a/container-disc/src/main/sh/vespa-start-container-daemon.sh
+++ b/container-disc/src/main/sh/vespa-start-container-daemon.sh
@@ -19,7 +19,12 @@ cd ${VESPA_HOME} || { echo "Cannot cd to ${VESPA_HOME}" 1>&2; exit 1; }
. libexec/vespa/common-env.sh
-DISCRIMINATOR=`echo ${VESPA_CONFIG_ID} | md5sum | cut -d' ' -f1`
+if test "$(uname -s)" = Darwin
+then
+ DISCRIMINATOR=`echo ${VESPA_CONFIG_ID} | md5 -r | cut -d' ' -f1`
+else
+ DISCRIMINATOR=`echo ${VESPA_CONFIG_ID} | md5sum | cut -d' ' -f1`
+fi
CONTAINER_HOME="${VESPA_HOME}/var/jdisc_container/${DISCRIMINATOR}/"
ZOOKEEPER_LOG_FILE_PREFIX="${VESPA_HOME}/logs/vespa/zookeeper.${VESPA_SERVICE_NAME}"