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

Re: running scripts (manual and auto)



Hi,
	I cannot explain why your case does not work. But I think it is more convient to use the fetchmail
	in the following way.

	put a fetchmail, like your script in /etc/ppp/ip-up.d/. and then put a fetchmailrc mail
	in your root directory, and run fetchmail as root. In your fetchmailrc, have something like
	user horacio there has password xxxx is user horacio here.

	then root will forward all these mails to user horacio. You can then use .forward with procmail
	or exim to do the fitering...

	Hope this helps...

shao.

On Sun, May 16, 1999 at 02:48:42PM +0200, J Horacio MG wrote:
> I usually download mail from my ISP by running the following command as
> user horacio:
> 
> $ fetchmail -v -a -u my_id
> 
> and I just created a script with that line and named it
> /home/horacio/getmail:
> 
> ----- start getmail -----
> #!/bin/sh
> 
> fetchmail -v -a -u my_id
> ----- end getmail -----
> 
> and gave it executable permissions(0777):
> 
> 1 -rwxrwxrwx   1 horacio  horacio
> 
> This works providing I run it like:
> 
> $ ./getmail
> 
> but how can I make it ran as a normal command (without "./").
> Also, I created another script in /etc/ppp/ip-up.d/:
> 
> ----- start script -----
> #/bin/sh
> 
> fetchmail -f /home/horacio/.fetchmailrc -a -u a4608456
> 
> runq
> ----- end script -----
> 
> named it 02fetchmail, and gave it the following permissions:
> 
> 1 -rwxr-xr-x   1 root     root
> 
> so that it fetchs mail from my ISP at connection, but this one doesn't
> work at all... what's wrong with it?  I too have another two scripts in
> the same directory:
> 
> ----- start 01sendmail -----
> #!/bin/sh
> 
> # Flush exim queue
> if [ -x /usr/sbin/exim ]; then
>         /usr/sbin/exim -qf
> 	fi
> ----- end 01sendmail -----
> 
> (actually, this is just the default exim script renamed), and:
> 
> ----- start 00time -----
> #!/bin/sh
> /usr/sbin/rdate -s slug.ctv.es
> /sbin/hwclock --systohc
> ----- end 00time -----
> 
> I think these two work (don't really know for sure).
> 
> TIA
> 
> Horacio
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 
> 

-- 
____________________________________________________________________________
Shao Zhang - Running Debian 2.1  ___ _               _____
Department of Communications    / __| |_  __ _ ___  |_  / |_  __ _ _ _  __ _ 
University of New South Wales   \__ \ ' \/ _` / _ \  / /| ' \/ _` | ' \/ _` |
Sydney, Australia               |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: shao@cia.com.au                                                  |___/ 
_____________________________________________________________________________


Reply to: