File: config

package info (click to toggle)
solid-pop3d 0.15-30
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,896 kB
  • sloc: ansic: 6,347; sh: 2,089; makefile: 75
file content (30 lines) | stat: -rwxr-xr-x 801 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# vim: ft=sh:ts=4:et:sts=4
#
set -e 

# Source debconf library.
. /usr/share/debconf/confmodule

INITFILE=/etc/init.d/solid-pop3d
CONFIGFILE=/etc/default/solid-pop3d
RUN_MODE=inetd

[ -f "$CONFIGFILE" ] && . "$CONFIGFILE"

# preserve user changes in the config file
if [ "$RUN_MODE" = "daemon" ] ; then
    db_set solid-pop3d/run_mode daemon
else
    db_set solid-pop3d/run_mode inetd
fi

db_input medium solid-pop3d/run_mode || true
db_go || true

# Make dpkg-reconfigure stop the solid-pop3d server before
# /etc/default/solid-pop3d is modified by the postinst script.
if [ "$1" = "reconfigure" ] && [ "$RUN_MODE" = "daemon" ] \
   && [ -x "$INITFILE" ] && which invoke-rc.d >/dev/null; then
    invoke-rc.d solid-pop3d stop >&2 || echo "Warning: failed to stop solid-pop3d server" >&2
fi