File: logargs.sh

package info (click to toggle)
exim4 4.99.1-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 26,208 kB
  • sloc: ansic: 119,253; sh: 4,083; xml: 2,112; perl: 918; makefile: 550
file content (28 lines) | stat: -rwxr-xr-x 753 bytes parent folder | download | duplicates (5)
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
#! /bin/sh
# Copyright (c) The Exim Maintainers 2022
# SPDX-License-Identifier: GPL-2.0-or-later

# This script can be interposed between a calling program and another
# program, in order to log the arguments which are being used. This can
# be helpful in finding out what is going on if some program is calling
# Exim with arguments it doesn't understand.

# Set this to the the path of the program that must ultimately be called.

CALL=exim

# Set this to the name of the file where the data is to be logged. The
# script writes on the end of it. It must be accessible to the user who
# runs the script.

LOGFILE=/home/ph10/tmp/zz

# The arguments are copied to the log file

echo $@ >>$LOGFILE

# The real program is now called

exec $CALL $@

# End