diff options
Diffstat (limited to 'community/darkstat/darkstat.install')
-rw-r--r-- | community/darkstat/darkstat.install | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/community/darkstat/darkstat.install b/community/darkstat/darkstat.install new file mode 100644 index 000000000..a92bba909 --- /dev/null +++ b/community/darkstat/darkstat.install @@ -0,0 +1,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" +} |