source: trunk/init/samhain.startFreeBSD.in @ 321

Last change on this file since 321 was 59, checked in by rainer, 15 years ago

Fix for exit status if database load fails; fix for problem with GrowingLogFiles? if signed database is used; better support for *BSD init script installation.

File size: 665 bytes
Line 
1#!/bin/sh
2
3# PROVIDE: @install_name@
4# REQUIRE: LOGIN
5# KEYWORD: shutdown
6
7. /etc/rc.subr
8
9name="@install_name@"
10rcvar=`set_rcvar`
11
12pidfile="@mylockfile@"
13
14# there are no required_files in general,
15# as they might be downloaded from the server
16#
17# required_files="@myconffile@ @mydatafile@"
18
19extra_commands="reload"
20stop_postcmd="remove_stale_files"
21
22command="@sbindir@/@install_name@"
23
24is_set()
25{
26    eval "[ -n \"\${$1+X}\" ]"
27}
28
29remove_stale_files()
30{
31    if test -f @mylockfile@; then
32        /bin/rm -f @mylockfile@
33    fi
34    /bin/rm -f @mylockdir@/${name}.sock
35}
36
37load_rc_config "$name"
38
39if ! is_set ${rcvar}; then 
40    eval "${rcvar}=YES"
41fi
42
43run_rc_command "$1"
44
Note: See TracBrowser for help on using the repository browser.