1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Install file for Pen post_install() { # Add pen user useradd -s /sbin/nologin -p $(openssl rand -base64 32) pen # Create run directory systemd-tmpfiles --create } post_remove() { # Remove run directory rm -Rf "/var/run/pen" # Remove pen user & group cat <<EOF ==> **Notice** ==> Please remove the pen user if no longer required. ==> # userdel pen EOF }