File: graphite-web.postinst

package info (click to toggle)
graphite-web 1.1.4-3%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,416 kB
  • sloc: python: 11,275; sh: 61; makefile: 53
file content (21 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e

DIRS="/var/log/graphite"

if [ "$1" = "configure" ]; then
	if ! getent passwd _graphite > /dev/null; then
		adduser --system --quiet --home /var/lib/graphite --no-create-home \
			--shell /bin/false --force-badname --group --gecos "Graphite User" _graphite
	fi

	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#