File: weakforced-common.postinst

package info (click to toggle)
weakforced 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,040 kB
  • sloc: cpp: 20,397; python: 2,002; sh: 700; makefile: 432
file content (31 lines) | stat: -rwxr-xr-x 670 bytes parent folder | download
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
#!/bin/sh

set -e

case "$1" in
  configure)
    if [ -z "`getent group wforce`" ]; then
      addgroup --quiet --system wforce
    fi
    if [ -z "`getent passwd wforce`" ]; then
      echo -n "Creating user and group wforce..."
      adduser --quiet --system --home /var/spool/wforce --shell /bin/false --ingroup wforce --disabled-password --disabled-login --gecos "wforce" wforce
      echo "done"
    fi
  ;;

  *)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 1
  ;;
esac

# Init script has errors in previous versions. Postinst script should just
# return the exit status of this script
initscript_error() {
	return $1
}

#DEBHELPER#

exit 0