diff options
Diffstat (limited to 'lcm/docker/instance_init.sh')
-rwxr-xr-x | lcm/docker/instance_init.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lcm/docker/instance_init.sh b/lcm/docker/instance_init.sh index b226f219..aa04c5d8 100755 --- a/lcm/docker/instance_init.sh +++ b/lcm/docker/instance_init.sh @@ -3,12 +3,12 @@ MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1` MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2` -if [ $MYSQL_AUTH ]; then - MYSQL_ROOT_USER=`echo $MYSQL_AUTH | cut -d: -f 1` - MYSQL_ROOT_PASSWORD=`echo $MYSQL_AUTH | cut -d: -f 2` +if [ $MYSQL_ROOT_USER ] && [ $MYSQL_ROOT_PASSWORD ]; then + MYSQL_ROOT_USER=$MYSQL_ROOT_USER + MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD else - MYSQL_ROOT_USER="root" - MYSQL_ROOT_PASSWORD="root" + MYSQL_ROOT_USER="root" + MYSQL_ROOT_PASSWORD="root" fi function create_database { |