Sindbad~EG File Manager
Current Path : /var/lib/dpkg/info/ |
|
Current File : /var/lib/dpkg/info/scx.postrm |
#!/bin/sh
# If we're called for upgrade, don't do anything
if [ "$1" != "upgrade" -a "$1" != "purge" ]; then
# Check if port 1270 is open
/opt/omi/bin/omiconfigeditor httpsport -q 1270 < /etc/opt/omi/conf/omiserver.conf > /dev/null 2>&1
if [ $? -eq 0 ]; then
touch /etc/opt/microsoft/scx/conf/scxagent-enable-port
# Remove port 1270 from the list of ports that OMI will listen on
/opt/omi/bin/omiconfigeditor httpsport -r 1270 < /etc/opt/omi/conf/omiserver.conf > /etc/opt/omi/conf/omiserver.conf_temp
mv /etc/opt/omi/conf/omiserver.conf_temp /etc/opt/omi/conf/omiserver.conf
fi
fi
# Clean up logrotate
rm -f /etc/logrotate.d/scxagent
rm -f /etc/cron.d/scxagent
DeleteSoftLinkToSudo() {
if [ -L /etc/opt/microsoft/scx/conf/sudodir ]; then
LINKED_DIR=`(cd /etc/opt/microsoft/scx/conf/sudodir ; pwd -P)`
[ x${LINKED_DIR} = x/usr/bin ] && rm /etc/opt/microsoft/scx/conf/sudodir
fi
}
DeleteSoftLinkToTmpDir() {
if [ -L /etc/opt/microsoft/scx/conf/tmpdir ]; then
LINKED_DIR=`(cd /etc/opt/microsoft/scx/conf/tmpdir ; pwd -P)`
[ x${LINKED_DIR} = x/tmp ] && rm /etc/opt/microsoft/scx/conf/tmpdir
fi
}
/opt/omi/bin/service_control reload
# If we're called for upgrade, don't do anything
if [ "$1" != "upgrade" -a "$1" != "purge" ]; then
DeleteSoftLinkToSudo
DeleteSoftLinkToTmpDir
fi
if [ -e /usr/sbin/semodule ]; then
if [ ! -z "$(/usr/sbin/semodule -l | grep scxagent-logrotate)" ]; then
echo "Removing selinux policy module for scxagent-logrotate ..."
/usr/sbin/semodule -r scxagent-logrotate
fi
fi
exit 0
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists