summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD16
-rw-r--r--config11
-rw-r--r--ossec.install19
4 files changed, 25 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 138a1d9d97b0..98f7450f9645 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -15,7 +15,7 @@ pkgbase = ossec-hids
source = config
sha256sums = ed5bc3483d5e864a8f8283f57127d1251b458c184e5b263be8be4c89f4cf85c3
sha256sums = be5f6fe7e10603a0897c2502e0e6913fbb544a66f59674aaaef87d0f31d09eb9
- sha256sums = bf47f0919a2470f199cf731e68063939a59a31541c0ae3ebe87a561760f5f3f2
+ sha256sums = 372b4584093204f37a9cdeb6df5f7dc1a7f88873adc15f8b7de68d0378f2edf8
pkgname = ossec-hids
diff --git a/PKGBUILD b/PKGBUILD
index f907e36496ee..9280eb8f300c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,11 +12,11 @@ backup=('var/ossec/etc/ossec.conf')
install=ossec.install
options=('emptydirs')
source=(https://github.com/ossec/$pkgname/archive/$pkgver.tar.gz \
- ossec.service
+ ossec.service
config)
sha256sums=('ed5bc3483d5e864a8f8283f57127d1251b458c184e5b263be8be4c89f4cf85c3'
'be5f6fe7e10603a0897c2502e0e6913fbb544a66f59674aaaef87d0f31d09eb9'
- 'bf47f0919a2470f199cf731e68063939a59a31541c0ae3ebe87a561760f5f3f2')
+ '372b4584093204f37a9cdeb6df5f7dc1a7f88873adc15f8b7de68d0378f2edf8')
_instdir=/var/ossec
@@ -42,17 +42,17 @@ package() {
_preparevars
. "$srcdir/config" # load configuration
- mkdir -p $pkgdir/etc
-
./install.sh
- # install systemd service
- install -Dm0644 "$srcdir"/ossec.service "$pkgdir"/usr/lib/systemd/system/ossec.service
+ # install systemd service unit
+ install -Dm0644 "$srcdir/ossec.service" "$pkgdir/usr/lib/systemd/system/ossec.service"
+ # install license
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/ossec-hids/LICENSE
- # change the users
+ # change user permissions
find "$pkgdir" -user nobody -exec chown 524 '{}' ';'
find "$pkgdir" -user mail -exec chown 525 '{}' ';'
find "$pkgdir" -user daemon -exec chown 526 '{}' ';'
- # change the groups
+ # change group permissions
find "$pkgdir" -group nobody -exec chgrp 525 '{}' ';'
}
diff --git a/config b/config
index 35ac775436c3..36ea26da7407 100644
--- a/config
+++ b/config
@@ -3,11 +3,17 @@
# What type of install is this? (server, agent, local, hybrid?):
export USER_INSTALL_TYPE=server
+# Do you want to update it? (y/n) [y]:
+export USER_UPDATE=y
+
+# Do you want to update the rules? (y/n) [y]:
+export USER_UPDATE_RULES=y
+
# User Language:
export USER_LANGUAGE=en
# Do you want e-mail notification? (y/n) [y]:
-export USER_ENABLE_EMAIL=yes
+export USER_ENABLE_EMAIL=y
# What's your e-mail address?
export USER_EMAIL_ADDRESS=foo@example.com
# What's your SMTP server ip/host?
@@ -47,5 +53,4 @@ export USER_ENABLE_FIREWALL_RESPONSE=y
export USER_WHITE_LIST=n
# Do you want to enable remote syslog (port 514 udp)? (y/n) [y]:
-export USER_ENABLE_SYSLOG=n
-
+export USER_ENABLE_SYSLOG=y
diff --git a/ossec.install b/ossec.install
index 477b6ac46397..d4eb6cb8c09d 100644
--- a/ossec.install
+++ b/ossec.install
@@ -1,12 +1,9 @@
# arg 1: the new package version
pre_install() {
- getent group ossec >/dev/null || usr/sbin/groupadd -g 525 ossec
- getent passwd ossec >/dev/null || usr/sbin/useradd -u 524 -g ossec -d '/var/ossec' -s /bin/false ossec
- getent passwd ossecm >/dev/null || usr/sbin/useradd -u 525 -g ossec -d '/var/ossec' -s /bin/false ossecm
- getent passwd ossecr >/dev/null || usr/sbin/useradd -u 526 -g ossec -d '/var/ossec' -s /bin/false ossecr
- usr/bin/passwd -l ossec &>/dev/null
- usr/bin/passwd -l ossecm &>/dev/null
- usr/bin/passwd -l ossecr &>/dev/null
+ getent group ossec >/dev/null || groupadd -g 525 ossec
+ getent passwd ossec >/dev/null || useradd -u 524 -g ossec -d '/var/ossec' -s /bin/false ossec
+ getent passwd ossecm >/dev/null || useradd -u 525 -g ossec -d '/var/ossec' -s /bin/false ossecm
+ getent passwd ossecr >/dev/null || useradd -u 526 -g ossec -d '/var/ossec' -s /bin/false ossecr
}
post_upgrade() {
@@ -15,10 +12,10 @@ post_upgrade() {
# arg 1: the old package version
post_remove() {
- usr/sbin/userdel ossec &>/dev/null
- usr/sbin/userdel ossecm &>/dev/null
- usr/sbin/userdel ossecr &>/dev/null
- usr/sbin/groupdel ossec &>/dev/null
+ userdel ossec &>/dev/null
+ userdel ossecm &>/dev/null
+ userdel ossecr &>/dev/null
+ groupdel ossec &>/dev/null
}
# vim:set ts=2 sw=2 et: