[pm-h] Power::Outlet

Julian Brown julian at jlbprof.com
Sat Nov 22 21:28:34 PST 2014


You can get approximate lat and long if you know the zip code.

Their is a free download of zip codes with lat and long database on the
inter tubes.

Julian

On Sat, Nov 22, 2014 at 10:17 PM, Michael R. Davis via Houston <
houston at pm.org> wrote:

> Perl Mongers,
>
> > or something fancier if you have a daytime/nighttime script
> > 0-59/10 * * * * is_nighttime && power-outlet iBoot ON  host mylamp
> > 5-59/10 * * * * is_daytime   && power-outlet iBoot OFF  host mylamp
>
> I'm finally putting plan to code and I ran into an issue that there does
> not appear to be a standard for the location of a system.  In order to
> calculate the sunset and sunrise for my is_nighttime/is_daytime scripts, I
> need to know the location of the host.  Please let me know if you know of
> any system location standards for something that I feel should be
> ubiquitous.
>
> For now, I'm planning to add a file to /etc/profiles.d to add this
> environment variable for the users on my server.
>
> my ($lon, $lat, $hae) = split(/\s/,
> $ENV{"LOCATION_COORDINATES_WGS84_LON_LAT_HAE"}||"");
>
> It might be nice to populate it from data stored in a
> /etc/local.coordinates file or something.  From my perspective, knowing
> your location is as important as knowing your time zone (e.g.
> /etc/localtime)
>
> /etc/local.coordinates
> [main]
> version=1
> crs=wgs84
> latitude=38.896783
> longitude=-77.036509
> hae=30
> address=1600 Pennsylvania Avenue NW, Washington, DC
>
> Any comments?
> Thanks,
> Mike
>
> _______________________________________________
> Houston mailing list
> Houston at pm.org
> http://mail.pm.org/mailman/listinfo/houston
> Website: http://houston.pm.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/houston/attachments/20141122/09631c03/attachment-0001.html>


More information about the Houston mailing list