2010-11-05 Ramon Novoa <rnovoa@artica.es>
* installer/pandora.mpi: Updated installation messages. * pandora_windows_service.cc: startup_delay after the service is started, not before. Read all secondary server parameters. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
388b03d2cf
commit
d6b935083b
|
@ -1,3 +1,10 @@
|
||||||
|
2010-11-05 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* installer/pandora.mpi: Updated installation messages.
|
||||||
|
|
||||||
|
* pandora_windows_service.cc: startup_delay after the service is
|
||||||
|
started, not before. Read all secondary server parameters.
|
||||||
|
|
||||||
2010-11-03 Ramon Novoa <rnovoa@artica.es>
|
2010-11-03 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* bin/util/tentacle_client.exe: Updated the tentacle client.
|
* bin/util/tentacle_client.exe: Updated the tentacle client.
|
||||||
|
|
|
@ -2429,7 +2429,7 @@ StopPandoraService
|
||||||
}
|
}
|
||||||
::msgcat::mcmset en {
|
::msgcat::mcmset en {
|
||||||
1957048E-B498-4FFF-A8BA-F2DF640463B1,Message
|
1957048E-B498-4FFF-A8BA-F2DF640463B1,Message
|
||||||
{This program will install <%AppName%> v<%Version%> in your computer. When you finish this installation, probably you will need to edit the agent configuration file to add aditional modules or review main setup parameters.
|
{This program will install <%AppName%> (build <%Version%>) in your computer. When you finish this installation, probably you will need to edit the agent configuration file to add aditional modules or review main setup parameters.
|
||||||
|
|
||||||
Please click on Next button to continue, or Cancel to exit this setup.
|
Please click on Next button to continue, or Cancel to exit this setup.
|
||||||
}
|
}
|
||||||
|
@ -2650,7 +2650,7 @@ StopPandoraService
|
||||||
}
|
}
|
||||||
::msgcat::mcmset es {
|
::msgcat::mcmset es {
|
||||||
1957048E-B498-4FFF-A8BA-F2DF640463B1,Message
|
1957048E-B498-4FFF-A8BA-F2DF640463B1,Message
|
||||||
{Este programa instalará <%AppName%> v<%Version%> en su equipo.
|
{Este programa instalará <%AppName%> (build <%Version%>) en su equipo.
|
||||||
|
|
||||||
Se recomienda cerrar las demas aplicaciones antes de continuar.
|
Se recomienda cerrar las demas aplicaciones antes de continuar.
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,6 @@ void
|
||||||
Pandora_Windows_Service::pandora_init () {
|
Pandora_Windows_Service::pandora_init () {
|
||||||
string conf_file, interval, debug, transfer_interval, util_dir, path, env;
|
string conf_file, interval, debug, transfer_interval, util_dir, path, env;
|
||||||
string udp_server_enabled, udp_server_port, udp_server_addr, udp_server_auth_addr;
|
string udp_server_enabled, udp_server_port, udp_server_addr, udp_server_auth_addr;
|
||||||
int startup_delay = 0;
|
|
||||||
|
|
||||||
setPandoraDebug (true);
|
setPandoraDebug (true);
|
||||||
|
|
||||||
|
@ -164,13 +163,6 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
srand ((unsigned) time (0));
|
srand ((unsigned) time (0));
|
||||||
this->setSleepTime (this->interval);
|
this->setSleepTime (this->interval);
|
||||||
|
|
||||||
/* Sleep if a startup delay was specified */
|
|
||||||
startup_delay = atoi (conf->getValue ("startup_delay").c_str ()) * 1000;
|
|
||||||
if (startup_delay > 0) {
|
|
||||||
pandoraLog ("Delaying startup %d miliseconds", startup_delay);
|
|
||||||
Sleep (startup_delay);
|
|
||||||
}
|
|
||||||
|
|
||||||
pandoraLog ("Pandora agent started");
|
pandoraLog ("Pandora agent started");
|
||||||
|
|
||||||
/* Launch UDP Server */
|
/* Launch UDP Server */
|
||||||
|
@ -460,11 +452,24 @@ Pandora_Windows_Service::copyDataFile (string filename)
|
||||||
copy_to_secondary = 1;
|
copy_to_secondary = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the file to the secondary server if needed
|
// Exit unless we have to send the file to a secondary server
|
||||||
if (copy_to_secondary == 0) {
|
if (copy_to_secondary == 0) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read secondary server configuration
|
||||||
|
mode = conf->getValue ("secondary_transfer_mode");
|
||||||
|
host = conf->getValue ("secondary_server_ip");
|
||||||
|
remote_path = conf->getValue ("secondary_server_path");
|
||||||
|
|
||||||
|
// Fix remote path
|
||||||
|
if (mode != "local" && remote_path[remote_path.length () - 1] != '/') {
|
||||||
|
remote_path += "/";
|
||||||
|
} else if (mode == "local" && remote_path[remote_path.length () - 1] != '\\') {
|
||||||
|
remote_path += "\\";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send the file to the secondary server
|
||||||
if (mode == "ftp") {
|
if (mode == "ftp") {
|
||||||
rc = copyFtpDataFile (host, remote_path, filename, conf->getValue ("secondary_server_pwd"));
|
rc = copyFtpDataFile (host, remote_path, filename, conf->getValue ("secondary_server_pwd"));
|
||||||
} else if (mode == "tentacle" || mode == "") {
|
} else if (mode == "tentacle" || mode == "") {
|
||||||
|
@ -1152,11 +1157,21 @@ void
|
||||||
Pandora_Windows_Service::pandora_run () {
|
Pandora_Windows_Service::pandora_run () {
|
||||||
Pandora_Agent_Conf *conf = NULL;
|
Pandora_Agent_Conf *conf = NULL;
|
||||||
string server_addr;
|
string server_addr;
|
||||||
|
int startup_delay = 0;
|
||||||
|
static unsigned char delayed = 0;
|
||||||
|
|
||||||
pandoraDebug ("Run begin");
|
pandoraDebug ("Run begin");
|
||||||
|
|
||||||
conf = this->getConf ();
|
conf = this->getConf ();
|
||||||
|
|
||||||
|
/* Sleep if a startup delay was specified */
|
||||||
|
startup_delay = atoi (conf->getValue ("startup_delay").c_str ()) * 1000;
|
||||||
|
if (startup_delay > 0 && delayed == 0) {
|
||||||
|
delayed = 1;
|
||||||
|
pandoraLog ("Delaying startup %d miliseconds", startup_delay);
|
||||||
|
Sleep (startup_delay);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check for configuration changes */
|
/* Check for configuration changes */
|
||||||
if (getPandoraDebug () == false) {
|
if (getPandoraDebug () == false) {
|
||||||
this->checkConfig ();
|
this->checkConfig ();
|
||||||
|
|
Loading…
Reference in New Issue