File: postinst

package info (click to toggle)
e2guardian 5.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,460 kB
  • sloc: cpp: 26,422; sh: 682; makefile: 525; perl: 141
file content (27 lines) | stat: -rwxr-xr-x 543 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
21
22
23
24
25
26
27
#! /bin/sh

set -e

logdir="/var/log/e2guardian"

mkdir -p "${logdir}"

if ! id -u e2guardian > /dev/null 2>&1 ; then
	adduser --system --group \
	    --disabled-login \
	    --gecos "e2guardian User" \
	    --home "${logdir}" \
	    --no-create-home \
	    --shell "/bin/sh" \
	    e2guardian
fi

### set correct permissions on the log directory and its files

chown "e2guardian:e2guardian" "$logdir"
chmod u=rwx "$logdir"

chown "e2guardian:e2guardian" "$logdir/"* 2>/dev/null || true
chmod u=rw "$logdir/"* 2>/dev/null || true

#DEBHELPER#