File: graphite-api.postinst

package info (click to toggle)
graphite-api 1.1.3-2%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 752 kB
  • sloc: python: 7,757; sh: 215; makefile: 150
file content (20 lines) | stat: -rw-r--r-- 497 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
#!/bin/sh

set -e

DIRS="/var/log/graphite-api /var/lib/graphite-api"

if [ "$1" = "configure" ]; then
    # This use is shared with graphite-web
    adduser --system --quiet --home /var/lib/graphite --no-create-home \
	    --shell /bin/false --force-badname --group --gecos "Graphite User" _graphite

    for i in $DIRS; do
	mkdir -m 0755 -p $i
	if ! dpkg-statoverride --list $i >/dev/null 2>&1; then
	    dpkg-statoverride --update --add _graphite _graphite 0755 $i
	fi
    done
fi

#DEBHELPER#