diff --git a/container_files/bin/start.sh b/container_files/bin/start.sh index 581a7cd..7db3e12 100755 --- a/container_files/bin/start.sh +++ b/container_files/bin/start.sh @@ -16,10 +16,9 @@ if [ -e "/tmp/firsttimerunning" ]; then fi echo "Setting DataDir: $MYSQL_DATADIR" >> $log - sed -e "s=\${MYSQL_DATADIR}=$MYSQL_DATADIR=" < /etc/my.cnf > /etc/my.cnf - - echo "/etc/my.cnf is:" - cat /etc/my.cnf + sed -e "s=\${MYSQL_DATADIR}=$MYSQL_DATADIR=" < /etc/my.cnf > /etc/my.cnf.new + rm /etc/my.cnf >> $log + mv /etc/my.cnf.new /etc/my.cnf >> $log if [[ $CREATE_NEW_DATABASE == 1 || ($CREATE_NEW_DATABASE == if_needed && ( ! -d $MYSQL_DATADIR || -z $(ls -A $MYSQL_DATADIR) ) ) ]]; then