summaryrefslogtreecommitdiffstats
path: root/scripts/Configure-eximon
blob: 0aca3b338ec65154ca5f9fa0b5d286fcd1e1c294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/sh

# Shell script to build the configurable part of the Exim monitor's start-up
# script. This is built from various configuration files. The final part is
# added in the Makefile, using various macros that are available at that stage.

scripts=../scripts

# First off, get the OS type, and check that there is a make file for it.

os=`$scripts/os-type -generic` || exit 1

if	test ! -r ../OS/Makefile-$os
then    echo ""
	echo "*** Sorry - operating system $os is not supported"
        echo "*** See OS/Makefile-* for supported systems" 1>&2
        echo ""
	exit 1;
fi

# We also need the architecture type, in order to test for any architecture-
# specific configuration files.

arch=`$scripts/arch-type` || exit 1

# Build a file called eximon in the current directory by joining
# the generic default configure file, the OS base configure file, and then
# local generic, OS-specific, architecture-specific, and OS+architecture-
# specific configurationfiles, if they exist. These files all contain variable
# definitions, with later definitions overriding earlier ones.

echo "#!/bin/sh" > eximon
chmod a+x eximon

# Concatenate the configuration files that exist

for f in OS/eximon.conf-Default \
         OS/eximon.conf-$os \
         Local/eximon.conf \
         Local/eximon.conf-$os \
         Local/eximon.conf-$arch \
         Local/eximon.conf-$os-$arch
do   if test -r ../$f
     then   echo "# From $f"
	    sed '/^#/d;/^[   ]*$/d' ../$f || exit 1
	    echo "# End of $f"
	    echo ""
     fi
done >> eximon || exit 1

# End of Configure-eximon