Hi Monks,
I'm looking for a cpan module which reads through some sort of file (eg a shell file) and executes system commands, and then checks for errors. It seems like this was what perl was built for:
Eg I might have a text file called update.sh, that looks like this:
apt-get -y install ffmpeg
cpan -i FFmpeg::Command
cp a.png b.png
svn co ......
tar ............
etc etc etc
You get the idea. What I would like is a perl module that can read through such a file and execute the system maintenance commands on a remote PC.
These are my limitations:
- It does not need to be synchronous (although it can be).
- It is running behind a router or firewall *(this means I probably can't log on to it), so it will have to periodically download a file with a series of commands in it from a convenient server.
- It should provide a log of activity that can be analysed or uploaded to a server later.
What do you think?
I am looking at Net::SSH::Perl and Sys::Manage::Desktops, but I'm not sure yet whether they meet my needs. How do you do this on your setups?
Thanks and regards
Steve
* = Update
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.