File: taskd.postinst

package info (click to toggle)
taskd 1.1.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,580 kB
  • sloc: cpp: 13,971; python: 1,523; sh: 1,052; perl: 610; ansic: 48; makefile: 15
file content (29 lines) | stat: -rwxr-xr-x 612 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
#!/bin/sh

set -e

USER=Debian-taskd
GROUP=Debian-taskd

case "$1" in
    configure)

      # Create taskd user
      if ! getent passwd $USER > /dev/null 2>&1
      then
        adduser --system --group --quiet \
          --home /var/lib/taskd --no-create-home \
          --shell /usr/sbin/nologin --gecos "Taskd sync server" \
          --force-badname $USER
      fi

      for i in /var/lib/taskd /etc/taskd/config; do
        if [ -f $i ] && ! dpkg-statoverride --list $i >/dev/null 2>&1; then
          dpkg-statoverride --update --add $USER $GROUP 755 $i
        fi
      done

    ;;
esac

#DEBHELPER#