File: postinst

package info (click to toggle)
lbcd 3.5.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,708 kB
  • sloc: ansic: 11,073; sh: 1,816; perl: 503; makefile: 165
file content (24 lines) | stat: -rwxr-xr-x 790 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
#!/bin/sh

set -e

# Add a user for the daemon to run as.
if ! getent passwd lbcd >/dev/null; then
    adduser --disabled-password --quiet --system --no-create-home \
	--home /nonexistent --gecos "Load Balancing Client Daemon" --group lbcd
fi

# Handle upgrades from versions supporting NO_START in /etc/default/lbcd.
# Convert this to a properly disabled configuration.  upstart does not support
# update-rc.d <service> disable, so upstart users will need to manually
# disable the daemon for now.
if [ "$1" = 'configure' ] && [ -f /etc/default/lbcd ] ; then
    if [ -n "$2" ] && dpkg --compare-versions "$2" lt 3.5.0 ; then
        . /etc/default/lbcd
        if [ "$NO_START" = 1 ] ; then
            update-rc.d lbcd defaults-disabled >/dev/null 2>&1
        fi
    fi
fi

#DEBHELPER#