SPDX: Mass-update to GPL-2.0-or-later
[exim.git] / src / util / logargs.sh
1 #! /bin/sh
2 # Copyright (c) The Exim Maintainers 2022
3 # SPDX-License-Identifier: GPL-2.0-or-later
4
5 # This script can be interposed between a calling program and another
6 # program, in order to log the arguments which are being used. This can
7 # be helpful in finding out what is going on if some program is calling
8 # Exim with arguments it doesn't understand.
9
10 # Set this to the the path of the program that must ultimately be called.
11
12 CALL=exim
13
14 # Set this to the name of the file where the data is to be logged. The
15 # script writes on the end of it. It must be accessible to the user who
16 # runs the script.
17
18 LOGFILE=/home/ph10/tmp/zz
19
20 # The arguments are copied to the log file
21
22 echo $@ >>$LOGFILE
23
24 # The real program is now called
25
26 exec $CALL $@
27
28 # End