[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] [OT] Showing uptime - Final results



At 1:50 PM -0500 8/22/00, James Montz wrote:
How can you use this script with a Cobalt Raq3 cgi-wrapper enabled?

I get the following error;

CGIWrap Error: Execution of this script not permitted
Execution of (root) is not permitted for the following reason:

User not Privlidged.

Here's how to get this working:

1. Save the PERL script below as a straight text file (WordPad, NotePad, BBEdit, etc.)

2. Upload the PERL script, below, as "text" or "automatic", and as user "admin" if possible.

3.	Chmod  the script 755, or something similar to those permissions.

	Enjoy!


At 10:12 PM -0700 8/21/00, Cody Watkins wrote:
This is it below:

(then addiing Stew Smith's "comma breaker"/$token lines:)

 >------------------------------------------

#!/usr/bin/perl

chop($uptime = `uptime`);
@_=split(" ",$uptime);
$updays=@_[2];
 >$uphours=@_[4];
     if ($uphours =~ /\S,$/)
     {  chop $uphours;  }
print ("Content-Type:text/html\n\n");
print "This server has been up for $updays days and $uphours hours.";
exit;

 >--------------------------------------

	Thanks to Cody, Stew, Kyle, and Stephen. You guys rock!   : )



Patrick Beart
--
-------------------------------------------------------------------
patrick@xxxxxxxxxxxxxxxxxxx       503-558-8322      Clackamas(Portland), OR
Web Architecture:   http://www.WebArchitecture.com
Intelligent Internet consulting, site development, and hosting solutions since 1994

* Founding MEMBER --  Internet Professionals Northwest. (www.ipn.org)
* MEMBER -- Webmaster's Guild/ Association of Internet Professionals
 -------------------------------------------------------------------