1 2 3 4 5 6 7 8 9 10 11 12 13 14
daemon_name=darkstat daemon_chroot=/var/"$daemon_name" post_install() { /usr/sbin/useradd -s /bin/false -r -N -g nobody "$daemon_name" if [ ! -d "$daemon_chroot" ]; then install -d "$daemon_chroot" fi chown -R "$daemon_name":nobody "$daemon_chroot" } post_remove() { /usr/sbin/userdel "$daemon_name" }