malwaredb 0.3.2

Service for storing malicious, benign, or unknown files and related metadata and relationships.
#!/bin/sh

set -e

# Postinstall script for MalwareDB, based on Postgres' script.

# Add the user if it doesn't exist.
if ! getent passwd mdbd > /dev/null; then
    adduser --system --home /var/lib/malwaredb --no-create-home \
        --shell /bin/bash --group --gecos "MalwareDB Server" mdbd
fi

# if the user was created manually, make sure the group is there as well
if ! getent group mdbd > /dev/null; then
    addgroup --system mdbd
fi
# make sure mdbd is in the mdbd group
if ! id -Gn mdbd | grep -qw mdbd; then
    adduser mdbd mdbd
fi

#DEBHELPER#