File: deluged.postinst

package info (click to toggle)
deluge 1.3.15-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 20,756 kB
  • ctags: 3,121
  • sloc: python: 22,201; sh: 141; makefile: 22
file content (27 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

set -e

add_override()
{
    # add_override <user> <group> <perms> <file>
    if ! dpkg-statoverride --list $4 >/dev/null 2>&1; then
      dpkg-statoverride --update --add $@
    fi
}

case "$1" in
  configure)
    if ! getent passwd debian-deluged >/dev/null; then
      adduser --system --group --quiet --no-create-home --home /var/lib/deluged debian-deluged
    fi

    add_override debian-deluged adm 2750 /var/log/deluged
    add_override debian-deluged debian-deluged 0750 /var/lib/deluged
    add_override debian-deluged debian-deluged 0750 /var/lib/deluged/config
    ;;
esac

#DEBHELPER#

exit 0;