mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
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.
This commit is contained in:
parent
61f38ba1b3
commit
ae60cd7b87
@ -37,7 +37,7 @@ SHORTNAME="cloud-agent"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
PROGNAME="CloudStack Agent"
|
||||
CLASS="com.cloud.agent.AgentShell"
|
||||
PROG="jsvc"
|
||||
DAEMON="/usr/bin/jsvc"
|
||||
@ -82,13 +82,13 @@ wait_for_network() {
|
||||
}
|
||||
|
||||
start() {
|
||||
log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
|
||||
if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
|
||||
log_progress_msg "apparently already running"
|
||||
log_end_msg 0
|
||||
exit 0
|
||||
log_daemon_msg "$PROGNAME apparently already running"
|
||||
log_end_msg 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
|
||||
if hostname --fqdn >/dev/null 2>&1 ; then
|
||||
true
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user