mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
2010-11-29 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Remove all init symbolic links. * plugins/pandora_update: Give the agent daemon some time to stop. Necessary on Windows. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3640 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1cc5ce313d
commit
5464253819
@ -1,3 +1,10 @@
|
|||||||
|
2010-11-29 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandora_agent_installer: Remove all init symbolic links.
|
||||||
|
|
||||||
|
* plugins/pandora_update: Give the agent daemon some time to stop.
|
||||||
|
Necessary on Windows.
|
||||||
|
|
||||||
2010-11-25 Miguel de Dios <miguel.dedios@artica.es>
|
2010-11-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* pandora_agent.spec: change version number.
|
* pandora_agent.spec: change version number.
|
||||||
|
@ -110,7 +110,21 @@ uninstall () {
|
|||||||
rm -Rf $PANDORA_BASE/etc/rc.pandora_agent_daemon 2> /dev/null
|
rm -Rf $PANDORA_BASE/etc/rc.pandora_agent_daemon 2> /dev/null
|
||||||
rm -Rf $PANDORA_BASE/etc/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
rm -Rf $PANDORA_BASE/etc/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
||||||
rm -Rf $PANDORA_BASE/sbin/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
rm -Rf $PANDORA_BASE/sbin/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf $PANDORA_BASE/etc/rc?.d/S90pandora_agent 2> /dev/null
|
||||||
|
rm -Rf $PANDORA_BASE/sbin/rc?.d/S90pandora_agent 2> /dev/null
|
||||||
|
rm -Rf $PANDORA_BASE/etc/rc.d/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf $PANDORA_BASE/etc/rc.d/rc?.d/S90pandora_agent 2> /dev/null
|
||||||
rm -Rf $PANDORA_BASE/usr/local/etc/rc.d/pandora_agent 2> /dev/null
|
rm -Rf $PANDORA_BASE/usr/local/etc/rc.d/pandora_agent 2> /dev/null
|
||||||
|
rm -Rf /etc/init.d/pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf /sbin/init.d/pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf /etc/rc.pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf /etc/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf /sbin/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf /etc/rc?.d/S90pandora_agent 2> /dev/null
|
||||||
|
rm -Rf /sbin/rc?.d/S90pandora_agent 2> /dev/null
|
||||||
|
rm -Rf /etc/rc.d/rc?.d/S90pandora_agent_daemon 2> /dev/null
|
||||||
|
rm -Rf /etc/rc.d/rc?.d/S90pandora_agent 2> /dev/null
|
||||||
|
rm -Rf /usr/local/etc/rc.d/pandora_agent 2> /dev/null
|
||||||
|
|
||||||
rm -Rf $PANDORA_BASE$PANDORA_HOME 2> /dev/null
|
rm -Rf $PANDORA_BASE$PANDORA_HOME 2> /dev/null
|
||||||
rm -Rf $PANDORA_BASE$PANDORA_LOG_DIR 2> /dev/null
|
rm -Rf $PANDORA_BASE$PANDORA_LOG_DIR 2> /dev/null
|
||||||
|
@ -12,6 +12,9 @@ use File::Copy;
|
|||||||
use FindBin;
|
use FindBin;
|
||||||
use Digest::MD5 qw(md5);
|
use Digest::MD5 qw(md5);
|
||||||
|
|
||||||
|
# Time to wait before the service stops
|
||||||
|
use constant SERVICE_STOP_WAIT => 5;
|
||||||
|
|
||||||
# This tool is intented to be used to update pandora agent binaries using
|
# This tool is intented to be used to update pandora agent binaries using
|
||||||
# the file collection feature. This will work using a module like this:
|
# the file collection feature. This will work using a module like this:
|
||||||
|
|
||||||
@ -139,7 +142,8 @@ if (compare_twofiles ($running_binary, $updated_binary) == 0 ){
|
|||||||
close (FILE3);
|
close (FILE3);
|
||||||
|
|
||||||
my $output = `$stop_pandora`;
|
my $output = `$stop_pandora`;
|
||||||
copy($updated_binary, $running_binary) or die "Problems updating binary from $updated_binary";
|
sleep SERVICE_STOP_WAIT;
|
||||||
|
copy($updated_binary, $running_binary) or unlink $local_log;
|
||||||
$output = `$start_pandora`;
|
$output = `$start_pandora`;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user