File: //opt/microsoft/mysql-cimprov/bin/mycimprovauth
#!/bin/sh
# Copyright (c) Microsoft Corporation. All rights reserved.
# Helper script to help guarentee that auth file directory is created before running mycimprovauth
# If auth directory doesn't exist, blindly try and enumerate (preexec should create auth directory)
if [ `id -u` -ne 0 -a ! -d /var/opt/microsoft/mysql-cimprov/auth/$USER ]; then
/opt/omi/bin/omicli ei root/mysql MySQL_Server 1> /dev/null 2> /dev/null
fi
exec /opt/microsoft/mysql-cimprov/bin/.mycimprovauth "$@"