From 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Jul 2013 01:10:32 -0700 Subject: Fri Jul 19 01:09:18 PDT 2013 --- community/darkstat/darkstat.install | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 community/darkstat/darkstat.install (limited to 'community/darkstat/darkstat.install') diff --git a/community/darkstat/darkstat.install b/community/darkstat/darkstat.install new file mode 100644 index 000000000..246bfd808 --- /dev/null +++ b/community/darkstat/darkstat.install @@ -0,0 +1,20 @@ +daemon_name=darkstat +daemon_chroot=var/darkstat + +post_install() { + if [ ! -d "$daemon_chroot" ]; then + install -d "$daemon_chroot" + touch "$daemon_chroot/darkstat.dat" + fi + useradd \ + --system \ + --home /"$daemon_chroot" \ + --shell /bin/false \ + --no-user-group \ + --gid nobody "$daemon_name" + chown -R "$daemon_name":nobody "/$daemon_chroot" +} + +post_remove() { + userdel "$daemon_name" +} -- cgit v1.2.3-54-g00ecf