From: Dinko Korunic Date: Thu, 11 Mar 2010 18:24:20 +0000 (+0100) Subject: - ispravni dpkg-parsechangelog za date u ossec-init.conf X-Git-Tag: v2.3-1~1 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=b71bebed41caaa112ba103173ad614378d66a9e8;hp=-c;p=ossec-hids.git - ispravni dpkg-parsechangelog za date u ossec-init.conf - izmjena dozvola za ossec direktorij u purgeu - micanje grupa i korisnika u purgeu --- b71bebed41caaa112ba103173ad614378d66a9e8 diff --git a/debian/postrm b/debian/postrm index 3f3c4d9..cc661bc 100644 --- a/debian/postrm +++ b/debian/postrm @@ -19,6 +19,33 @@ esac # cleanup leftovers rm -rf /var/ossec/etc /var/ossec/queue /var/ossec/stats + +# chown ossec mail directory back to root +chown -Rh root:root /var/ossec + +# users and group names +OSSEC_USER="ossec" +OSSEC_USER_MAIL="ossecm" +OSSEC_USER_EXEC="ossece" +OSSEC_USER_REM="ossecr" +OSSEC_GROUP="ossec" + +# delete users/groups +if getent passwd $OSSEC_USER >/dev/null; then + deluser $OSSEC_USER +fi +if getent passwd $OSSEC_USER_MAIL >/dev/null; then + deluser $OSSEC_USER_MAIL +fi +if getent passwd $OSSEC_USER_EXEC >/dev/null; then + deluser $OSSEC_USER_EXEC +fi +if getent passwd $OSSEC_USER_REM >/dev/null; then + deluser $OSSEC_USER_REM +fi +if getent group $OSSEC_GROUP >/dev/null; then + delgroup --quiet $OSSEC_GROUP +fi # update system v init links update-rc.d -f ossec-hids remove diff --git a/debian/rules b/debian/rules index db885c7..13a2f2b 100755 --- a/debian/rules +++ b/debian/rules @@ -110,7 +110,7 @@ install: build # system ossec-init echo "DIRECTORY=\"/var/ossec\"" > $(PKGDIR)/etc/ossec-init.conf echo "VERSION=\"`cat src/VERSION`\"" >> $(PKGDIR)/etc/ossec-init.conf - echo "DATE=\"$(date --utc -d "$(dpkg-parsechangelog | sed -ne 's/Date: //p')")\"" >> $(PKGDIR)/etc/ossec-init.conf + echo "DATE=\"$(shell date --utc -d "$(shell dpkg-parsechangelog | sed -ne 's/Date: //p')")\"" >> $(PKGDIR)/etc/ossec-init.conf echo "TYPE=\"local\"" >> $(PKGDIR)/etc/ossec-init.conf # Build architecture-independent files here.