[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] System Script via UI
- Subject: [cobalt-developers] System Script via UI
- From: "Alan J Sonnenberg" <alan.sonnenberg@xxxxxxxxxxxxx>
- Date: Tue Aug 20 06:03:04 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
hello-
Anyone have any insight to running "system scripts" from the Cobalt UI
on a RAQ 550. Assumed it would be fairly straight forward looking at
some php files provided with the system, but I am clearly missing
something.
I have included two small files as the example:
alan.php . Simple php file that should fork script
alan.pl . Simple script located in /usr/sausalito/sbin
The script runs when started from the shell prompt and touches file.
When I use the UI to bring up the page alan.php, it loads, but the
script never runs (that I can tell). I have tried passing the user
"root" to the fork() also. Any ideas will be greatly appreciated.
Thanks
Alan
------------- alan.php------------------
<?php
include("ServerScriptHelper.php");
$helper = new ServerScriptHelper();
$cmd = "/usr/sausalito/sbin/alan.pl";
$stat = $helper->fork($cmd, "httpd");
// Nothing in stat??.... Not sure where to pick up error, possible in
helper->errors
$helper->destructor();
?>
-------------- /usr/sausalito/sbin/alan.pl ----------------
#!/usr/bin/perl -I/usr/sausalito/perl
#
use strict;
# sane umask
umask(002);
system("/bin/touch /tmp/alan");