#!/bin/sh pre_install() { if ! id -u hornet > /dev/null 2>&1; then useradd --no-create-home --system hornet > /dev/null fi mkdir -p /etc/hornet /var/lib/hornet } post_install() { chown -R hornet:hornet /var/lib/hornet /etc/hornet } post_upgrade () { chown -R hornet:hornet /var/lib/hornet /etc/hornet } pre_remove() { systemctl stop hornet.service } post_remove() { userdel hornet > /dev/null }