#!/bin/sh set -e USER=lipl case "$1" in install|upgrade) # 1. create user if not existing if ! getent passwd | grep -q "^${USER}:"; then echo -n "Adding user ${USER}.." adduser --quiet \ --comment "Lipl Display User" \ --no-create-home \ --home "/usr/bin" \ --shell "/usr/bin/lipl-display-slint" \ --disabled-password \ ${USER} echo "..done" fi # 2. Add user lipl to video group usermod --append --groups video lipl # 3. Create a directory for storing log files mkdir -p /var/log/${USER} chown ${USER}:${USER} /var/log/${USER} ;; esac #DEBHELPER#