[Canberra-pm] Runing commands on server.
Paul Fenwick
pjf at perltraining.com.au
Mon Dec 16 17:34:51 CST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
G'day Finn,
On Tue, Dec 17, 2002 at 10:08:50AM +1100, Finn Blucher wrote:
> not really sure where to start with this. Basically I would like
> people to be able to double click on an icon on their windows
> desktop and it executes commands on a linux server. I was thinking
[...]
> mostly needed to start backups manually. It probably would only need
> to be capable of running one predefined command. Any ideas, or has
> this all been done before?
To use the oft-quoted Perl motto, "There's more than one way to do it".
However, if you're running a web-server (such as apache) on your
Linux server, then I may have a very simple and easy solution for you.
Create a script which runs the backup commands that you're after,
and place it in a basic-auth protected cgi-bin directory. The
basic-auth means that it's not going to be stumbled over by
web-crawlers or curious work experience students. Make sure that
your script prints out a content-type
(print "Content-type: text/plain\n\n"), and you probably should have
it spawn off a separate process so the backup can run as an
independant task to the original CGI (which your web-server may kill
if it gets bored, or the client goes away). Randal outlines one
such method of doing this (with source-code) at:
http://www.stonehenge.com/merlyn/LinuxMag/col39.html
You can probably get away with something much less complex than what
Randal has done, since you may not have a requirement to monitor
the running process from a web-browser.
Once you've done that, it's simply a task of book-marking the page
and dragging the bookmark to the desktop.
Cheers,
Paul
- --
Paul Fenwick <pjf at perltraining.com.au> | http://perltraining.com.au/
Director of Training | Ph: +61 3 9354 6001
Perl Training Australia | Fax: +61 3 9354 2681
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9/mMbx5N6j7FHnlURAl9wAJ4m/O5+2qHeZYsgc3O+itiJc1klyQCcDQcr
hF3x20tdncV8ysLqB8KtaSI=
=i6WW
-----END PGP SIGNATURE-----
More information about the Canberra-pm
mailing list