mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
2010-11-22 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_daemon: Solaris specific fixes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3619 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
db5098e884
commit
0d5c224085
@ -1,3 +1,7 @@
|
|||||||
|
2010-11-22 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandora_agent_daemon: Solaris specific fixes.
|
||||||
|
|
||||||
2010-11-22 Ramon Novoa <rnovoa@artica.es>
|
2010-11-22 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* Linux/pandora_agent.conf: Set root as the default pandora_user.
|
* Linux/pandora_agent.conf: Set root as the default pandora_user.
|
||||||
|
@ -37,6 +37,7 @@ pidof_pandora () {
|
|||||||
if [ "$OS_NAME" = "SunOS" ]
|
if [ "$OS_NAME" = "SunOS" ]
|
||||||
then
|
then
|
||||||
ZONENAME_CMD="/bin/zonename"
|
ZONENAME_CMD="/bin/zonename"
|
||||||
|
TRUNCATED_DAEMON=`echo "$DAEMON $PANDORA_PATH" | cut -c1-40`
|
||||||
if [ -x $ZONENAME_CMD ]
|
if [ -x $ZONENAME_CMD ]
|
||||||
then
|
then
|
||||||
ZONE=`$ZONENAME_CMD`
|
ZONE=`$ZONENAME_CMD`
|
||||||
@ -45,9 +46,9 @@ pidof_pandora () {
|
|||||||
fi
|
fi
|
||||||
if [ "$ZONE" = "global" ]
|
if [ "$ZONE" = "global" ]
|
||||||
then
|
then
|
||||||
PANDORA_PID=`ps -f -z global | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'`
|
PANDORA_PID=`ps -f -z global | grep "$TRUNCATED_DAEMON" | grep -v grep | head -1 | awk '{ print $2 }'`
|
||||||
else
|
else
|
||||||
PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'`
|
PANDORA_PID=`ps -Af | grep "$TRUNCATED_DAEMON" | grep -v grep | head -1 | awk '{ print $2 }'`
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'`
|
PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'`
|
||||||
@ -72,7 +73,7 @@ case "$1" in
|
|||||||
echo "Cannot launch again. Aborting."
|
echo "Cannot launch again. Aborting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
nohup $DAEMON $PANDORA_PATH 2> $LOGFILE &
|
PATH=$PATH nohup $DAEMON $PANDORA_PATH 2> $LOGFILE &
|
||||||
rm nohup.out 2> /dev/null
|
rm nohup.out 2> /dev/null
|
||||||
sleep 2
|
sleep 2
|
||||||
PANDORA_PID=`pidof_pandora`
|
PANDORA_PID=`pidof_pandora`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user