Update entrypoint.sh

This commit is contained in:
Andrew Bauer 2018-01-16 20:47:23 -06:00 committed by GitHub
parent 530e10610e
commit 0305dfea92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ close_mysql () {
echo echo
# Make sure ZoneMinder can write to the log folder
chown www-data:www-data /var/log/zm
# Configure then start Mysql # Configure then start Mysql
if [ -n "$MYSQL_SERVER" ] && [ -n "$MYSQL_USER" ] && [ -n "$MYSQL_PASSWORD" ] && [ -n "$MYSQL_DB" ]; then if [ -n "$MYSQL_SERVER" ] && [ -n "$MYSQL_USER" ] && [ -n "$MYSQL_PASSWORD" ] && [ -n "$MYSQL_DB" ]; then
sed -i -e "s/ZM_DB_NAME=zm/ZM_DB_NAME=$MYSQL_USER/g" /etc/zm.conf sed -i -e "s/ZM_DB_NAME=zm/ZM_DB_NAME=$MYSQL_USER/g" /etc/zm.conf