Skip to content

Commit ae60cd7

Browse files
committed
init: log_process_msg doesn't work, so use log_daemon_msg for that.
We also exit earlier, we don't display that we are even trying to start. When we detect the agent is already running we exit right away with a message.
1 parent 61f38ba commit ae60cd7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ SHORTNAME="cloud-agent"
3737
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
3838
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
3939
LOGFILE=@AGENTLOG@
40-
PROGNAME="Cloud Agent"
40+
PROGNAME="CloudStack Agent"
4141
CLASS="com.cloud.agent.AgentShell"
4242
PROG="jsvc"
4343
DAEMON="/usr/bin/jsvc"
@@ -82,13 +82,13 @@ wait_for_network() {
8282
}
8383

8484
start() {
85-
log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
8685
if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
87-
log_progress_msg "apparently already running"
88-
log_end_msg 0
89-
exit 0
86+
log_daemon_msg "$PROGNAME apparently already running"
87+
log_end_msg 0
88+
exit 0
9089
fi
9190

91+
log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
9292
if hostname --fqdn >/dev/null 2>&1 ; then
9393
true
9494
else

0 commit comments

Comments
 (0)