#!/bin/sh

[ "${ACTION}" = "remove" ] && exit 0

mkdir -p /var/empty

account info _sshd > /dev/null 2>&1 && exit
account create-group \
    --fullname "OpenSSH Server PrivSep Group" \
    --description "Privilege seperation group for running the OpenSSH server." \
    --host-gid 22 \
    _sshd
account create-user -d /var/empty -H \
    --fullname "OpenSSH Server PrivSep User" \
    --description "Privilege seperation user for running the OpenSSH server." \
    --host-uid 22 \
    --no-login \
    --groups _sshd \
    _sshd
