Skip to content

Commit 42d48fe

Browse files
lsauravrajesh-battala
authored andcommitted
cloudstack-6258: Log file will be set to cloud.out only if CLOUD_DEBUG is enabled
1 parent 156b08a commit 42d48fe

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • systemvm/patches/debian/config/etc/init.d

systemvm/patches/debian/config/etc/init.d/cloud

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ ENABLED=0
3333

3434
CMDLINE=$(cat /var/cache/cloud/cmdline)
3535

36+
if [ ! -z $CLOUD_DEBUG ];then
37+
LOG_FILE=/var/log/cloud/cloud.out
38+
else
39+
LOG_FILE=/dev/null
40+
fi
41+
3642
TYPE="router"
3743
for i in $CMDLINE
3844
do
@@ -98,7 +104,7 @@ start() {
98104
then
99105
if [ "$pid" == "" ]
100106
then
101-
(cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh > /var/log/cloud/cloud.out 2>&1 & )
107+
(cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh > $LOG_FILE 2>&1 & )
102108
pid=$(get_pids)
103109
echo $pid > /var/run/cloud.pid
104110
fi

0 commit comments

Comments
 (0)