From 6e6b0e1dab7c0d53cac3a3d42cdab1edf89aec7f Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Mon, 27 Jan 2020 13:48:13 +0100 Subject: [PATCH] generate instanceid non-deterministically --- rootfs/usr/local/bin/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/usr/local/bin/setup.sh b/rootfs/usr/local/bin/setup.sh index df29992..636c1ef 100755 --- a/rootfs/usr/local/bin/setup.sh +++ b/rootfs/usr/local/bin/setup.sh @@ -8,7 +8,8 @@ CONFIGFILE=/config/config.php # Create an initial configuration file. -instanceid=oc$(echo $PRIMARY_HOSTNAME | sha1sum | fold -w 10 | head -n 1) +instanceid=oc$(openssl rand -hex 6 | head -c 10) + cat > $CONFIGFILE <