Fix ansible startup script
[sdnc/oam.git] / installation / ansible-server / src / main / scripts / startAnsibleServer.sh
index 643bbab..f1e9316 100644 (file)
@@ -1,6 +1,7 @@
-#/bin/bash
+#!/bin/bash
+exec &> >(tee -a "/var/log/ansible-server.log")
 
-if [ ! -d /tmp/.ansible-server-installed]
+if [ ! -f /tmp/.ansible-server-installed ]
 then
        pip install PyMySQL
        pip install cherrypy
@@ -13,4 +14,4 @@ then
 fi
 
 cd /opt/onap/sdnc
-exec python RestServer.py > RestServer.out
\ No newline at end of file
+exec /usr/bin/python RestServer.py