So I've got a shell script that I want the output to be available as a
internal-only web page. The shell script is fairly intensive, so I'd like
it ran only when needed (i.e., not pre-generated). However, the shell
script calls a compiled program that is expecting certian enviromental
variables to be set (like, HOME, etc) that doesn't get done when run as
www-data (which is what Debian runs Apache as).
Right now my "web page" is simply:
<?php
$cmd = shell_exec('/home/bwindle/find-ASA-vpn-users.sh');
echo "<pre>$cmd";
?>
What's a clean way to do this?
--
Burton Windle [log in to unmask]
|