[Israel.pm] Renaming folder using perl

sawyer x xsawyerx at gmail.com
Tue May 5 07:47:52 PDT 2009


Hi.

> My Idea:
> I need to build a nagios plugin / agent manager.
> Currently I build a plugin manager that uses LWP to download the plugin,
> update the nrpe.cfg / NSC.ini
> file and restart the Agent Service. This command like all others is being
> run from plugins folder (NSClient++ folder if I must be correct);
> Until here there is no need to change any of the folders names.
>
> Now I was asked to build an agent manager, that will download (again with
> LWP) the agent, zipped.
> Then moves / rename the nagios / NSClient++ folder to backup_<scalar
> localtime>
> Unzip the new agent into the new folder (which has the same name), and then
> restart the nagios agent service.

What I do is just copy the files I want to backup to a different
folder, scp the new configuration file and reload Nagios. It's simple
and it works.


More information about the Perl mailing list