summaryrefslogtreecommitdiffstats
path: root/scripts/Configure-eximon
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
commite90fcc54809db2591dc083f43ef54c6ec8c60847 (patch)
treef20bc206c3c2d5d59d37c46c5cf5d53a20642556 /scripts/Configure-eximon
parentInitial commit. (diff)
downloadexim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.tar.xz
exim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.zip
Adding upstream version 4.96.upstream/4.96upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/Configure-eximon')
-rwxr-xr-xscripts/Configure-eximon51
1 files changed, 51 insertions, 0 deletions
diff --git a/scripts/Configure-eximon b/scripts/Configure-eximon
new file mode 100755
index 0000000..0aca3b3
--- /dev/null
+++ b/scripts/Configure-eximon
@@ -0,0 +1,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