Skip to content

Commit

Permalink
fix: source /etc/sysconfig/immudb on AWS EC2 startup
Browse files Browse the repository at this point in the history
Fix #1868: user can just set
/etc/sysconfig/immudb with desired env variables.
  • Loading branch information
SimoneLazzaris committed Nov 16, 2023
1 parent de21381 commit ffc5374
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/rndpass/startup.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/sh

if [ -f /etc/sysconfig/immudb ]
then
source /etc/sysconfig/immudb
fi
if [ -z "$IMMUDB_ADMIN_PASSWORD" ]
then
export IMMUDB_ADMIN_PASSWORD=`tr -cd '[:alnum:].,:;/@_=' < /dev/urandom|head -c 16`
IMMUDB_ADMIN_PASSWORD=`tr -cd '[:alnum:].,:;/@_=' < /dev/urandom|head -c 16`
echo "Generated immudb password: $IMMUDB_ADMIN_PASSWORD"
fi

export IMMUDB_ADMIN_PASSWORD
exec $@

0 comments on commit ffc5374

Please sign in to comment.