~ubuntu-branches/ubuntu/precise/exim4/precise

« back to all changes in this revision

Viewing changes to debian/exim4-base.exim4.init

  • Committer: Bazaar Package Importer
  • Author(s): Marc Haber
  • Date: 2007-10-07 21:38:22 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071007213822-qh6kpp40r2o2c3zf
Tags: 4.68-1
* new upstream version. Closes: #444195
  * Documents tls_verify_hosts during TLS sessions. Closes: #422419
  * new example.conf md5 sum
* Move lowuid router to a later place, handle real- only for
  locally generated messages. Thanks to Andreas Metzler and others
  on pkg-exim4-devel. Closes: #420217
* /etc/init.d/exim4:
  * Use start_daemon and killproc from lsb-base
    as a new plunge at #396944
  * Do not clean the environment as severly as before (functions
    need to survive).
* README.Debian:
  * Document that using client certificates needs extra
    configuration. Thanks to John Goerzen. Closes: #440663
* conf.d/main/03_exim4-config_tlsoptions: Make it clear that this
  file only concerns exim as an SMTP server.
* exim4-config.preinst: Add EX4DEBUG facility, add rm_conffile
  function
* Rename acl_whitelist_local_deny to acl_local_deny_exceptions
  as suggested by Ross Boylan. Closes: #387078.
* Switch Build-Depends to db4.6. Closes: #442645
* Debconf translations updates:
  - Portuguese. Thanks to Miguel Figueiredo. Closes: #441895, #445494
  - Norwegian Nynorsk. Thanks to Håvard Korsvoll.
* exim4-config.NEWS: Explicitly mention that .dpkg-old and
  .dpkg-dist files are included in the DEBCONFsomethingDEBCONF check to
  allow lazy people to only grep the docs instead of actually reading
  them. This was requested by Hamish Moffatt in #445327.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  set -x
34
34
fi
35
35
 
36
 
ENV="env -i LANG=C PATH=$PATH"
 
36
LANG=C
 
37
export LANG
37
38
 
38
39
#read default file
39
40
QUEUERUNNER='combined'
90
91
    install -d -oDebian-exim -gDebian-exim -m750 /var/run/exim4
91
92
  case ${QUEUERUNNER} in
92
93
    combined)
93
 
      $ENV start-stop-daemon --oknodo --start --pidfile "$PIDFILE" \
94
 
        --exec $DAEMON -- -bd -q${QFLAGS}${QUEUEINTERVAL} \
95
 
        ${COMMONOPTIONS} ${QUEUERUNNEROPTIONS} ${SMTPLISTENEROPTIONS}
 
94
      start_daemon -p "$PIDFILE" \
 
95
        "$DAEMON" -bd "-q${QFLAGS}${QUEUEINTERVAL}" \
 
96
        "${COMMONOPTIONS}" "${QUEUERUNNEROPTIONS}" "${SMTPLISTENEROPTIONS}"
96
97
      log_progress_msg "exim4"
97
98
      ;;
98
99
    separate)
99
 
      $ENV start-stop-daemon --oknodo --start --pidfile "$PIDFILE" \
100
 
        --exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS} ${COMMONOPTIONS}
 
100
      start_daemon -p "$PIDFILE" \
 
101
        "$DAEMON" -bd "${SMTPLISTENEROPTIONS}" "${COMMONOPTIONS}"
101
102
      log_progress_msg "exim4_listener"
102
 
      $ENV start-stop-daemon --oknodo --start --pidfile "$QRPIDFILE" \
103
 
        --exec $DAEMON -- -oP "$QRPIDFILE" \
104
 
        -q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS}
 
103
      start_daemon -p "$QRPIDFILE" \
 
104
        "$DAEMON" -oP "$QRPIDFILE" \
 
105
        "-q${QFLAGS}${QUEUEINTERVAL}" "${QUEUERUNNEROPTIONS}" "${COMMONOPTIONS}"
105
106
      log_progress_msg "exim4_queuerunner"
106
107
      ;;
107
108
    queueonly)
108
 
      $ENV start-stop-daemon --oknodo --start --pidfile "$QRPIDFILE" \
109
 
        --exec $DAEMON -- -oP "$QRPIDFILE" \
110
 
        -q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS}
 
109
      start_daemon -p "$QRPIDFILE" \
 
110
        "$DAEMON" -oP "$QRPIDFILE" \
 
111
        "-q${QFLAGS}${QUEUEINTERVAL}" "${QUEUERUNNEROPTIONS}" "${COMMONOPTIONS}"
111
112
      log_progress_msg "exim4_queuerunner"
112
113
      ;;
113
114
    no|ppp)
114
 
      $ENV start-stop-daemon --oknodo --start --pidfile "$PIDFILE" \
115
 
        --exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS}
 
115
      start_daemon -p "$PIDFILE" \
 
116
        "$DAEMON" -bd "${SMTPLISTENEROPTIONS}"
116
117
      log_progress_msg "exim4_listener"
117
118
      ;;
118
119
    nodaemon)
125
126
# we try to kill eximqr and exim SMTP listener, no matter what
126
127
# ${QUEUERUNNER} is set to, we could have switched since starting.
127
128
  if [ -f "$QRPIDFILE" ]; then
128
 
    start-stop-daemon --stop --oknodo --pidfile "$QRPIDFILE" \
129
 
      --oknodo --retry 30 --exec $DAEMON
 
129
    killproc -p "$QRPIDFILE" "$DAEMON"
130
130
    log_progress_msg "exim4_queuerunner"
131
131
  fi
132
132
  if [ -f "$PIDFILE" ]; then
133
 
    start-stop-daemon --stop --oknodo --pidfile "$PIDFILE" \
134
 
      --oknodo --retry 30 --exec $DAEMON
 
133
    killproc -p "$PIDFILE" "$DAEMON"
135
134
    log_progress_msg "exim4_listener"
136
135
  fi
137
 
  rm -f "$QRPIDFILE" "$PIDFILE" 
138
136
}
139
137
 
140
138
reload_exim()
141
139
{
142
140
  case ${QUEUERUNNER} in
143
141
    combined|no|ppp)
144
 
      start-stop-daemon --stop --pidfile "$PIDFILE" \
145
 
        --signal 1 --exec $DAEMON
 
142
      killproc -p "$PIDFILE" "$DAEMON" -HUP
146
143
      log_progress_msg "exim4"
147
144
      ;;
148
145
    separate)
149
 
      start-stop-daemon --stop --pidfile "$PIDFILE" \
150
 
        --signal 1 --exec $DAEMON
 
146
      killproc -p "$PIDFILE" "$DAEMON" -HUP
151
147
      log_progress_msg "exim4_listener"
152
 
      start-stop-daemon --stop --pidfile "$QRPIDFILE" \
153
 
        --signal 1 --exec $DAEMON
 
148
      killproc -p "$QRPIDFILE" "$DAEMON" -HUP
154
149
      log_progress_msg "exim4_queuerunner"
155
150
      ;;
156
151
  esac
175
170
      SMTPNAME="combined SMTP listener and queue runner daemon"
176
171
  fi
177
172
  log_action_begin_msg "checking $QRNAME"
178
 
  if start-stop-daemon --stop --signal 0 --quiet --pid $QRPIDFILE >/dev/null; then
 
173
  if pidofproc -p "$QRPIDFILE" >/dev/null; then
179
174
    log_action_end_msg 0 "running"
180
175
  else
181
176
    if [ -e "$QRPIDFILE" ]; then
185
180
    fi
186
181
  fi
187
182
  log_action_begin_msg "checking $SMTPNAME"
188
 
  if start-stop-daemon --stop --signal 0 --quiet --pid $PIDFILE >/dev/null; then
 
183
  if pidofproc -p "$PIDFILE" >/dev/null; then
189
184
    log_action_end_msg 0 "running"
190
185
    exit 0
191
186
  else