[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
[lighttpd] split logs daily
01-24-2012, 02:53 PM (This post was last modified: 01-24-2012 03:03 PM by Slevin.)
Post: #1
[lighttpd] split logs daily
I have the mod_accesslog module in lighttpd enabled and setup fine, but now the file can get really big.

I am now looking for a way to split these logs on a daily basis.
I already managed to setup a crontab for it.. but my script doesn't seem to work as i want it to

Code:
#!/bin/sh
#
/share/Apps/AppInit/appinit.cgi stop "lighttpd";sleep 10
mv /share/Apps/lighttpd/log/lighttpd.log /share/Apps/lighttpd/log/lighttpd_`date +%y%m%d`.log
touch /share/Apps/lighttpd/log/lighttpd.log
chmod 777 /share/Apps/lighttpd/log/lighttpd.log
/share/Apps/AppInit/appinit.cgi start "lighttpd"

This is ran every night at midnight.

When i use ls- l to see the files it shows that a new file was created (with timestamp).
But in samba it shows strange filenames..

what upsets me most is that it looks like lighttpd doesn't write anything to the newly created blank lighttpd.log..

Is there something wrong with my code?


PS, the crontab line i added is:
Code:
0 0 * * * /share/Apps/lighttpd/logbackup.sh
Here is how I added the line to the crontab http://slevo.no-ip.org:8080/wiki/doku.php/nmt/crontab

My PCH-A110 Stats | Samsung LE32A656 | Logitech Z-2300 | Harmony One
Oversight | Sick Beard DOGnzb | NZBGet | Transmission | Lighttpd | ...
Find all posts by this user
Add Thank You Quote this message in a reply
02-28-2012, 07:30 PM
Post: #2
RE: [lighttpd] split logs daily
I'd like to give this one a bump,

is it possible that the topic is in the wrong category too?
may be better if it is moved to "Network (NAS, Server, PC ...)" ?

My PCH-A110 Stats | Samsung LE32A656 | Logitech Z-2300 | Harmony One
Oversight | Sick Beard DOGnzb | NZBGet | Transmission | Lighttpd | ...
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [split] [Apps] I-pkg A100/A110 - Updated 27th Jan linky 1 1,790 01-27-2011 10:11 PM
Last Post: dc11ab
  proxy lighttpd to other port for_ale 1 1,581 09-26-2010 09:46 AM
Last Post: for_ale
  Daily Reboot Method? Clay 2 1,419 04-09-2010 04:37 AM
Last Post: Clay
  Lighttpd - 1.4.24 with PHP-5.2.11 for A110 vaidyasr 0 1,768 01-28-2010 11:26 AM
Last Post: vaidyasr
  split and merge telexxingou 5 1,784 09-16-2009 06:49 PM
Last Post: lordy
  Request: lighttpd + fastcgi + php5 macsat 19 6,342 09-08-2009 02:38 PM
Last Post: avanegmond
Exclamation [split] Using IMDB lordy 5 2,209 07-16-2009 05:39 PM
Last Post: dc11ab
  [split] RAR unpacking script mercenary 1 1,202 06-30-2009 04:44 PM
Last Post: dc11ab
  [split] Web browser access to the PCH from your PC Jean 0 1,243 08-11-2008 12:16 PM
Last Post: Jean

Forum Jump: