#!/bin/sh
#
# service-any-log-run (formerly "run.log")
# John Simpson <jms1@jms1.net> 2003-07-05
#
# Generic "run" script for daemontools log services. Allows up to 1024 log
# files to build up before they get rotated out of existence, and allows
# each file to become up to 1MB in size before they stop being used.
#
# 2005-04-11 jms1 - (no code changed.) changed the copyright notice to
#   specify that the license is the GPL VERSION 2 ONLY. i'm not comfortable
#   with the "or future versions" clause until i know what these "future
#   versions" will look like.
#
# 2005-11-24 jms1 - (no code changed.) changed the filename as stored on
#   the http://qmail.jms1.net/ web site.
#
# 2006-08-11 jms1 - added extra code to create a "log/lstatus" file which
#   will contain the latest "status:" line.
#
###############################################################################
#
# Copyright (C) 2003-2006 John Simpson.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# or visit http://www.gnu.org/licenses/gpl.txt
#
###############################################################################

VQ="/var/qmail"

exec env - PATH="$VQ/bin:/usr/local/bin:/usr/bin:/bin" \
  multilog t n1024 s1048576 ./main \
    '-*' '+*ver: status:*' =lstatus
