#!/usr/bin/perl use strict; use vars qw ($file $DELAY); ########## CONFIG $file = "lcd4linux"; # .png is appended $DELAY = 0; # delay in seconds # if delay is zero, file is sent when modified. ################# use CGI qw/:push -nph/; $| = 1; my ($mtime, $nmtime, $size, $nsize); (undef, undef, undef, undef, undef, undef, undef, $size, undef, $mtime) = stat "$file.png"; print multipart_init(-boundary=>'----------------here we go!'); while (1) { print multipart_start(-type=>'image/png'); undef $/; open(IN, "$file.png") or die("Can't read '$file.png'"); $_ = ; print $_; close(IN); print multipart_end; if ($DELAY) { sleep $DELAY; } else { W: while (1) { # sleep(1); (undef, undef, undef, undef, undef, undef, undef, $nsize, undef, $nmtime) = stat "$file.png"; if($mtime != $nmtime || $size != $nsize) { $mtime = $nmtime; $size = $nsize; last W; } } } } sub right'>Jonathan McCrohan
aboutsummaryrefslogtreecommitdiffstats
path: root/drv_generic.c (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2011-04-29Add Uploader details to Debian PackageJonathan McCrohan1-0/+1
2011-04-27Bug fix: "script lcd4linux/init.d/lcd4linux missing dependency onReinhard Tartler2-1/+5
2011-04-27No longer build the mpd module. Closes: #578226Reinhard Tartler1-0/+1
2011-04-27No longer compile against Python. Python 2.6 now links against libssl,Reinhard Tartler2-2/+3