diff options
author | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
commit | 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch) | |
tree | 03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/darkstat/darkstat.install | |
parent | e445a313723389ba9ee1fded025c567dae5b21ea (diff) |
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/darkstat/darkstat.install')
-rw-r--r-- | community/darkstat/darkstat.install | 20 |
1 files changed, 20 insertions, 0 deletions
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" +} |