2006-03-27 05:37:27 +02:00
|
|
|
#!/bin/csh
|
|
|
|
# Script de arranque de Agente Pandora
|
|
|
|
# Sancho Lerena, <slerena@gmail.com>
|
|
|
|
# Version para IPSO/BSD (csh)
|
|
|
|
# version 1.1
|
|
|
|
|
2007-04-11 Manuel Arostegui <marostegui@artica.es>
* pandora_agents/linux/pandora_agent.conf, pandora_agents.spec: Changed
PATHS to adapt them to the upcoming 1.3 release.
* pandora_agents/bsd-ipso/pandora_agent_daemon, pandora_agent.conf,
pandora_agent.sh: Changed PATHS to adapt them to
the upcoming 1.3 release.
* pandora_agents/aix/pandora_agent_daemon, pandora_agent.conf,
pandora_agent.sh: Changed PATHS to adapt them
to the upcoming 1.3 release.
* pandora_agents/hp-ux/pandora_agent_daemon, pandora_agent.conf,
pandora_agent.sh: Changed PATHS to adapt them
to the upcoming 1.3 release.
* pandora_agents/win32/bin/pandora_agent.conf: Changed PATHS to
adapt them to the upcoming 1.3 release.
* pandora_agents/meta_agent/pandora_agent_sim.sh, pandora_agent_daemon,
pandora_agent_1.conf, pandora_agent_2.conf, pandora_agent_3.conf,
pandora_agent_4.conf, pandora_agent_5.conf: Changed PATHS
to adapt them to the upcoming 1.3 release.
* pandora_agents/solaris/pandora_agent_daemon, pandora_agent.conf,
pandora_agent.sh: Changed PATHS to adapt them to the upcoming
1.3 release.
* pandora_server/pandora_network, pandora_snmpconsole, pandora_server
pandora_recon: Changed PATHS to adapt them to the
upcoming 1.3 release.
* pandora_server/specs/fedoracore5/pandora_server.spec: Changed
PATHS to adapt them to the upcoming 1.3 release.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@418 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-04-11 14:52:04 +02:00
|
|
|
set PANDORA_PATH=/usr/share/pandora_agent
|
2006-03-27 05:37:27 +02:00
|
|
|
set DAEMON=pandora_agent.sh
|
|
|
|
set PIDFILE=/var/run/pandora.pid
|
|
|
|
test -x $PANDORA_PATH/$DAEMON || exit
|
|
|
|
|
|
|
|
switch ($1)
|
|
|
|
case start:
|
|
|
|
if ( -e $PIDFILE ) then
|
|
|
|
echo "Pandora Agent is currently running on this machine. Aborting now..."
|
|
|
|
exit
|
|
|
|
else
|
|
|
|
nice -10 $PANDORA_PATH/$DAEMON $PANDORA_PATH & set MYPID=$!
|
|
|
|
echo $MYPID > /var/run/pandora.pid
|
|
|
|
echo "Pandora Agent is now running with PID $MYPID"
|
|
|
|
exit
|
|
|
|
endif
|
|
|
|
breaksw
|
|
|
|
case stop:
|
|
|
|
if ( -f $PIDFILE ) then
|
|
|
|
echo "Stopping Pandora Agent."
|
|
|
|
kill -9 `cat $PIDFILE`
|
|
|
|
rm $PIDFILE
|
|
|
|
else
|
|
|
|
echo "Pandora Agent is not running, cannot stop it. Aborting now..."
|
|
|
|
endif
|
|
|
|
breaksw
|
|
|
|
case restart:
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
breaksw
|
|
|
|
default:
|
|
|
|
echo "Uso: ./pandora_agent {start|stop|restart|force-reload}"
|
|
|
|
breaksw
|
|
|
|
|
|
|
|
endsw
|