summaryrefslogtreecommitdiff
path: root/pcr/snort/snort.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-22 03:49:31 -0800
committerroot <root@rshg054.dnsready.net>2012-11-22 03:49:31 -0800
commit13c6302fab6118693af345756375923b9fb7da69 (patch)
tree2d77bd9a6b8e37478a5b245a1734724b3a525c53 /pcr/snort/snort.install
parent38ea2e71952c00f18230ed0e691532aadff4e2c1 (diff)
Thu Nov 22 03:49:31 PST 2012
Diffstat (limited to 'pcr/snort/snort.install')
-rw-r--r--pcr/snort/snort.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/pcr/snort/snort.install b/pcr/snort/snort.install
new file mode 100644
index 000000000..673f22c6c
--- /dev/null
+++ b/pcr/snort/snort.install
@@ -0,0 +1,26 @@
+post_install() {
+ getent group snort >/dev/null || usr/sbin/groupadd -g 29 snort
+ getent passwd snort >/dev/null || usr/sbin/useradd -c 'Snort user' -u 29 -g snort -d /var/log/snort -s /bin/false snort
+ usr/bin/passwd -l snort &>/dev/null
+
+ [ -f var/log/snort/alert ] || : >var/log/snort/alert
+ chown snort.snort var/log/snort/ -R
+
+cat << _EOF
+
+>>> You have to edit the HOME_NET variable in the /etc/snort/snort.conf file to reflect your local network.
+>>> If you do not change it, snort may not work.
+
+_EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/userdel snort &>/dev/null
+ usr/sbin/groupdel snort &>/dev/null
+}
+
+# vim:set ts=2 sw=2 et: