... the script
The FAQchest
faqchest at abac.com
Thu Nov 15 10:14:09 CST 2001
~sdpm~
Mmm!, The attachment didn't made it. Let's see if inline it doesn't get
damage by the line wrapping. Thierry (thierryv at abac.com).
-------------------------------------------------------
#!/bin/sh
#
PATH=${PATH}:/bin:/usr/bin/:/usr/local/bin:/opt/perl5/bin:/usr/5bin:/usr/sbin:/usr/ucb
user_id=`id | sed -e 's/uid=//' | sed -e 's/(.*$//'`
if [ $# -ne 0 ]; then
if [ $1 -eq '-noroot' ]; then
user_id=0
fi
fi
if [ $user_id -eq 0 ]; then
echo 'Content-Type: text/plain; charset=iso-8859-1'
echo ''
echo "Sorry, you can not be running as 'root' in order to run this script."
echo
exit
fi
perl_loc=`which perl | grep perl | sed -e 's,/perl,,'`
current_dir=`pwd`
if [ ! -x $perl_loc/perl ]; then
echo 'Content-Type: text/plain; charset=iso-8859-1'
echo ''
echo "Error, can not locate 'perl' to run this script."
echo
exit
fi
chmod +x $perl_loc/perl
eval "exec $perl_loc/perl -x $0 $*"
#!perl
## Everything below is a perl script.
## The preceding line tells perl -x
## where to start reading code.
umask 022;
$| = 1;
print STDOUT "Content-Type: text/plain; charset=iso-8859-1\n\n";
print STDOUT "Yup\n";
## The rest of your script goes here
## END
-------------------------------------------------------
~sdpm~
The posting address is: san-diego-pm-list at hfb.pm.org
List requests should be sent to: majordomo at hfb.pm.org
If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:
unsubscribe san-diego-pm-list
If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.
More information about the San-Diego-pm
mailing list