File: graphite-web.postinst

package info (click to toggle)
graphite-web 0.9.12%2Bdebian-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,464 kB
  • ctags: 3,343
  • sloc: python: 6,713; sh: 79; makefile: 44
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#