2012-03-28 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Moved the code that sets PANDORA_USER to the right place. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5848 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
10aba27d29
commit
23be21f92f
|
@ -1,3 +1,8 @@
|
|||
2012-03-28 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandora_agent_installer: Moved the code that sets PANDORA_USER to
|
||||
the right place.
|
||||
|
||||
2012-03-02 Koichiro Kikuchi <koichiro@rworks.jp>
|
||||
|
||||
* pandora_agent: Fixed bug of my previous commit (removed "qw").
|
||||
|
|
|
@ -188,6 +188,17 @@ install () {
|
|||
echo "Checking Pandora FMS Agent on $PANDORA_BASE$PANDORA_BIN...."
|
||||
fi
|
||||
|
||||
# Set the user the agent will run as
|
||||
if [ "$PANDORA_USER" != "" ]
|
||||
then
|
||||
sed -e "s/.*pandora_user .*/pandora_user $PANDORA_USER/" $AGENT_CFG > $AGENT_CFG_TEMP 2> /dev/null && \
|
||||
mv $AGENT_CFG_TEMP $AGENT_CFG
|
||||
chmod 755 pandora_agent_daemon
|
||||
chown -R $PANDORA_USER $PANDORA_BASE
|
||||
else
|
||||
PANDORA_USER="root"
|
||||
fi
|
||||
|
||||
# Alter dynamically the daemon launcher and setup the new path
|
||||
# if PANDORA_BASE is customized.
|
||||
|
||||
|
@ -270,17 +281,6 @@ install () {
|
|||
mkdir -p $PANDORA_BASE$PANDORA_CFG 2> /dev/null
|
||||
mkdir -p $PANDORA_BASE$PANDORA_LOG_DIR 2> /dev/null
|
||||
|
||||
# Set the user the agent will run as
|
||||
if [ "$PANDORA_USER" != "" ]
|
||||
then
|
||||
sed -e "s/.*pandora_user .*/pandora_user $PANDORA_USER/" $AGENT_CFG > $AGENT_CFG_TEMP 2> /dev/null && \
|
||||
mv $AGENT_CFG_TEMP $AGENT_CFG
|
||||
chmod 755 pandora_agent_daemon
|
||||
chown -R $PANDORA_USER $PANDORA_BASE
|
||||
else
|
||||
PANDORA_USER="root"
|
||||
fi
|
||||
|
||||
# Create logfile
|
||||
if [ ! -z "`touch $PANDORA_BASE$PANDORA_LOG_DIR/$PANDORA_LOG`" ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue