From owner-freebsd-questions@FreeBSD.ORG Fri Jan 28 23:58:56 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1429616A4D0 for ; Fri, 28 Jan 2005 23:58:56 +0000 (GMT) Received: from smtp1.utdallas.edu (smtp1.utdallas.edu [129.110.10.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id D200043D2F for ; Fri, 28 Jan 2005 23:58:55 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from utd49554 (utd49554.utdallas.edu [129.110.3.85]) by smtp1.utdallas.edu (Postfix) with ESMTP id 420FF388D3E; Fri, 28 Jan 2005 17:58:55 -0600 (CST) Date: Fri, 28 Jan 2005 17:58:55 -0600 From: Paul Schmehl To: Xian , freebsd-questions@freebsd.org Message-ID: <9E6B95073433E88321774B74@utd49554.utdallas.edu> In-Reply-To: <200501282232.35750.ian@codepad.net> References: <200501282232.35750.ian@codepad.net> X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: custom periodic scripts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Schmehl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2005 23:58:56 -0000 --On Friday, January 28, 2005 10:32:35 PM +0000 Xian wrote: > How would I go about adding scripts to periodic? I particular I have a > couple of scripts to fetch virus definitions and scan my system. > I gathered the is a 'proper' way to do it by using > /usr/local/etc/periodic but not how to do it. Write the script. Put it in /etc/periodic/{period you want} Name it xxx.name (as in some number that isn't already used. Scripts are run in numerical order.) Make it executable for root. Edit the /etc/periodic.conf file to enable it. See the man page for details, but the syntax is period_scriptname_enable="YES" For example, write a script name "foo". Make it 250.foo and put it in /etc/periodic/daily. Chown it root:wheel and chmod it 750. Edit /etc/periodic.conf to read daily_foo_enable="YES". Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer The University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu