#!/bin/sh set -e # Create socktop user and group if they don't exist if ! getent group socktop >/dev/null; then addgroup --system socktop fi if ! getent passwd socktop >/dev/null; then adduser --system --ingroup socktop --home /var/lib/socktop \ --no-create-home --disabled-password --disabled-login \ --gecos "Socktop Agent" socktop fi # Create state directory mkdir -p /var/lib/socktop chown socktop:socktop /var/lib/socktop chmod 755 /var/lib/socktop # Create config directory if it doesn't exist mkdir -p /etc/socktop chmod 755 /etc/socktop #DEBHELPER# # Print helpful message to the user cat <