1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#/bin/sh
REINSTALL=0
if [ $# -eq 1 ] ; then
#Fedora runs prerm after postinst - reinstall(1), remove(0)
#Debian in newer versions sometimes has param remove
if [ "$1" = "1" ] ; then
REINSTALL=1
fi
fi
if [ -e /bin/wslinfo ] ; then
echo "Service Removed... (SystemV-WSL)"
else
if [ -e /bin/systemctl ] ; then
if [ $REINSTALL -eq 1 ] ; then
echo "Service Reinstall... (SystemD)"
else
systemctl disable hardinfo2
echo "Service Removed... (SystemD)"
fi
elif [ -e /sbin/chkconfig ] ; then
chkconfig hardinfo2 off
chkconfig --del hardinfo2
echo "Service Removed... (SystemV)"
else
update-rc.d hardinfo2 remove
echo "Service Removed... (SystemV-rc)"
fi
fi
|