incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [1/2] git commit: refs/heads/master - Make sure initial log messages go somewhere for agent and usage
Date Fri, 15 Feb 2013 14:56:24 GMT
Make sure initial log messages go somewhere for agent and usage


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/1dd40518
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1dd40518
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1dd40518

Branch: refs/heads/master
Commit: 1dd40518a4710c03dfd45baabc3122d05e776851
Parents: 825c1c1
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Fri Feb 15 15:48:22 2013 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Fri Feb 15 15:49:51 2013 +0100

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc |    5 +++--
 packaging/centos63/cloud-usage.rc |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1dd40518/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index acf8131..19782b7 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -31,7 +31,8 @@ whatami=cloudstack-agent
 SHORTNAME="$whatami"
 PIDFILE=/var/run/"$whatami".pid
 LOCKFILE=/var/lock/subsys/"$SHORTNAME"
-LOGFILE=/var/log/cloudstack/agent/agent.log
+LOGDIR=/var/log/cloudstack/agent
+LOGFILE=${LOGFIR}/agent.log
 PROGNAME="Cloud Agent"
 CLASS="com.cloud.agent.AgentShell"
 JSVC=`which jsvc 2>/dev/null`;
@@ -67,7 +68,7 @@ export CLASSPATH="$SCP:$DCP:$ACP:$JCP:/etc/cloudstack/agent:/usr/share/cloudstac
 start() {
         echo -n $"Starting $PROGNAME: "
 	if hostname --fqdn >/dev/null 2>&1 ; then
-		$JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" $CLASS
+		$JSVC -cp "$CLASSPATH" -outfile "${LOGDIR}/cloudstack-agent.out" -errfile "${LOGDIR}/cloudstack-agent.err"
-pidfile "$PIDFILE" $CLASS
 		RETVAL=$?
 		echo
 	else

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1dd40518/packaging/centos63/cloud-usage.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-usage.rc b/packaging/centos63/cloud-usage.rc
index 8bee5ae..dc97cd3 100755
--- a/packaging/centos63/cloud-usage.rc
+++ b/packaging/centos63/cloud-usage.rc
@@ -35,7 +35,8 @@
 SHORTNAME="cloudstack-usage"
 PIDFILE=/var/run/"$SHORTNAME".pid
 LOCKFILE=/var/lock/subsys/"$SHORTNAME"
-LOGFILE=/var/log/cloudstack/usage/usage.log
+LOGDIR=/var/log/cloudstack/usage
+LOGFILE=${LOGDIR}/usage.log
 PROGNAME="CloudStack Usage Monitor"
 CLASS="com.cloud.usage.UsageServer"
 PROG="jsvc"
@@ -79,7 +80,7 @@ start() {
 
     echo -n "Starting $PROGNAME" "$SHORTNAME"
 
-    if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER"
-errfile SYSLOG -Dpid=$$ $CLASS
+    if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH"  -outfile "${LOGDIR}/cloudstack-usage.out"
-errfile "${LOGDIR}/cloudstack-usage.err" -pidfile "$PIDFILE" -user "$USER" -Dpid=$$ $CLASS
         RETVAL=$?
     then
         rc=0


Mime
View raw message