user service mysql start
[vfc/nfvo/driver/vnfm/svnfm.git] / nokia / vnfmdriver / vfcadaptorservice / docker / docker-entrypoint.sh
index 1d235f6..124cfd3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright 2017 Huawei Technologies Co., Ltd.
+# Copyright 2017, Nokia Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # limitations under the License.
 #
 #
-# This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
-#
-# nfvo-driver-vnfm-huawei/target/docker-entrypoint.sh
-#
 
 if [ -z "$SERVICE_IP" ]; then
     export SERVICE_IP=`hostname -i`
@@ -46,8 +42,19 @@ echo
 # Configure service based on docker environment variables
 ./instance-config.sh
 
+function start_mysql {
+    echo "start mysql in entry point ... "
+    service mysql start  > myout_docker_enctrypoint.file 2>&1
+    cat myout_docker_enctrypoint.file
+    service mysql status > myout_docker_enctrypoint_mysql_status.file 2>&1
+    cat myout_docker_enctrypoint_mysql_status.file
+    sleep 5
+}
+
 # Start mysql
-su mysql -c /usr/bin/mysqld_safe &
+# su mysql -c /usr/bin/mysqld_safe &
+#service mysql start
+start_mysql
 
 # Perform one-time config
 if [ ! -e init.log ]; then