cloudstack-6258: Log file will be set to cloud.out only if CLOUD_DEBUG is enabled

This commit is contained in:
Saurav Lahiri 2014-04-03 14:07:21 +00:00 committed by Rajesh Battala
parent 156b08af5f
commit 42d48fe9ab

View File

@ -33,6 +33,12 @@ ENABLED=0
CMDLINE=$(cat /var/cache/cloud/cmdline)
if [ ! -z $CLOUD_DEBUG ];then
LOG_FILE=/var/log/cloud/cloud.out
else
LOG_FILE=/dev/null
fi
TYPE="router"
for i in $CMDLINE
do
@ -98,7 +104,7 @@ start() {
then
if [ "$pid" == "" ]
then
(cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh > /var/log/cloud/cloud.out 2>&1 & )
(cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh > $LOG_FILE 2>&1 & )
pid=$(get_pids)
echo $pid > /var/run/cloud.pid
fi