On 14-Dec-2010, at 13:41, Levan, Jerry wrote:

> I am executing this file every 10 minutes with a cron table entry:
> 0-59/10 *       *       *       *       /usr/local/bin/checkip.sh

You probably don't care, but crontab is officially deprecated and the proper 
(and far more flexible) way to do this is to use a LaunchAgent or LaunchDaemon. 
Very easy to setup with Lingon, and it gives rather a lot more options that 
simply every 10 minutes. I suspect there is a better way to see if the external 
IP address has changed, but mine changes every year to 18 months, so I don't 
care.

Also, I would put the temp files in /var/tmp myself as they are not *really* 
temporary in the /tmp sense. But that's being, probably, overly pedantic.


From the Filesystem Hierarchy Standard (FHS 2.3)

> /var/tmp : Temporary files preserved between system reboots
> 
> Purpose
> 
> The /var/tmp directory is made available for programs that require temporary 
> files or directories that are preserved between system reboots. Therefore, 
> data stored in /var/tmp is more persistent than data in /tmp.
> 
> Files and directories located in /var/tmp must not be deleted when the system 
> is booted. Although data stored in /var/tmp is typically deleted in a 
> site-specific manner, it is recommended that deletions occur at a less 
> frequent interval than /tmp.

And

> /tmp : Temporary files
> 
> Purpose
> 
> The /tmp directory must be made available for programs that require temporary 
> files.
> 
> Programs must not assume that any files or directories in /tmp are preserved 
> between invocations of the program.

Note the last paragraphs in each block.

-- 
SOURCERERS MAKE THEIR OWN DESTINY. THEY TOUCH THE EARTH LIGHTLY.

_______________________________________________
MacOSX-admin mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-admin

Reply via email to