File: config

package info (click to toggle)
clamsmtp 1.10-17
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,388 kB
  • sloc: sh: 3,940; ansic: 3,286; makefile: 21
file content (40 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download | duplicates (7)
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
#!/bin/sh
#
# config -- debconf script for clamsmtpd
#
# Copyright: Public Domain
set -e
if [ -f /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi

# New Install? Add the new user and group
if [ -z "$2" ] ; then
  db_set clamsmtp/addusergroup true
else
  # Upgrade: If clamsmtp doesn't exist, ask
  if [ -z "`getent passwd clamsmtp`" ] ; then
    # The default config file may be installed if no local changes were made
    if [ -f /etc/clamsmtpd.conf ] && \
          (grep -e '^User: clamsmtp' /etc/clamsmtpd.conf>/dev/null) ; then
      db_set clamsmtp/addusergroup true
    else
      db_set clamsmtp/addusergroup false
      db_input high clamsmtp/addusergroup || true
    fi
  fi

  # If this is an old version, ask about fixing permissions
  if dpkg --compare-versions "$2" le 1.2-1 ; then
# Set the default value for do-fixperms
    db_set clamsmtp/do-fixperms true
    db_input high clamsmtp/do-fixperms || true
  fi
fi

db_set clamsmtp/purge true
db_input medium clamsmtp/purge || true

# Go!
db_go || true