File: postinst

package info (click to toggle)
scanlogd 2.2.8-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 176 kB
  • sloc: ansic: 533; makefile: 102; sh: 97
file content (21 lines) | stat: -rw-r--r-- 474 bytes parent folder | download
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

if [ -d /home/scanlogd ] ; then # Clean up after #668722
	# If for some reason the directory isn't empty
	# then the directory shouldn't be unconditionally
	# removed
	rmdir --ignore-fail-on-non-empty /home/scanlogd
fi

# scanlogd needs a user
adduser --system --home /var/lib/scanlogd --no-create-home --quiet scanlogd || true

if which invoke-rc.d >/dev/null 2>&1; then
    invoke-rc.d scanlogd start
else
    /etc/init.d/scanlogd start
fi

#DEBHELPER#