[Pkg-ossec-devel] [pkg-ossec] 03/03: Removing users while purging agent.
Jose Antonio Quevedo Muñoz
jaqm-guest at moszumanska.debian.org
Tue Mar 18 10:14:42 UTC 2014
This is an automated email from the git hooks/post-receive script.
jaqm-guest pushed a commit to branch master
in repository pkg-ossec.
commit fd3686e0fd715e98880b86a955aa2ff4b54bd5b2
Author: Jose Antonio Quevedo <joseantonio.quevedo at gmail.com>
Date: Tue Mar 18 11:01:07 2014 +0100
Removing users while purging agent.
---
debian/ossec-hids-agent.postrm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/debian/ossec-hids-agent.postrm b/debian/ossec-hids-agent.postrm
index 0500528..7a2b6fa 100644
--- a/debian/ossec-hids-agent.postrm
+++ b/debian/ossec-hids-agent.postrm
@@ -28,6 +28,17 @@ case "$1" in
# Removing generated files
rm -f /var/lib/ossec/queue/alerts/execq
+ # Removing users
+ # Based on: https://wiki.debian.org/AccountHandlingInMaintainerScripts
+ if [ -x "$(command -v deluser)" ]; then
+ USERNAMES="ossecm ossecr ossec"
+ for username in $USERNAMES; do
+ deluser --quiet --system $username > /dev/null || true
+ done
+ else
+ echo >&2 "not removing $USERNAMES system account because deluser command was not found"
+ fi
+
;;
*)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ossec/pkg-ossec.git
More information about the Pkg-ossec-devel
mailing list