#!/bin/sh if [ "$1" != "upgrade" -a "$1" != "purge" ]; then rm -f /opt/omi/lib/libcrypto* /opt/omi/lib/libssl* /opt/omi/lib/.libcrypto* /opt/omi/lib/.libssl* rmdir /opt/omi/lib > /dev/null 2>&1 rmdir /opt/omi > /dev/null 2>&1 # Clean up cron and logrotate rm -f /etc/cron.d/omilogrotate > /dev/null 2>&1 rm -f /etc/logrotate.d/omi > /dev/null 2>&1 egrep -q "^omiusers:" /etc/group if [ $? -eq 0 ]; then echo "Deleting omiusers group ..." groupdel omiusers fi egrep -q "^omi:" /etc/passwd if [ $? -eq 0 ]; then echo "Deleting omi service account ..." userdel -f omi fi egrep -q "^omi:" /etc/group if [ $? -eq 0 ]; then echo "Deleting omi group ..." groupdel omi fi fi if [ "$1" != "upgrade" -a "$1" != "purge" ]; then if [ -e /usr/sbin/semodule ]; then if [ ! -z "$(/usr/sbin/semodule -l | grep omi-logrotate)" ]; then echo "Removing selinux policy module for omi-logrotate ..." /usr/sbin/semodule -r omi-logrotate fi if [ ! -z "$(/usr/sbin/semodule -l | grep omi-selinux)" ]; then echo "Removing selinux policy module for omi-selinux ..." /usr/sbin/semodule -r omi-selinux fi fi fi exit 0