#!/bin/sh # # $FreeBSD: ports/net-mgmt/ifgraph/pkg-deinstall,v 1.1 2003/12/08 20:51:56 krion Exp $ # PATH=/bin:/usr/bin:/usr/sbin case $2 in DEINSTALL) echo '---> Starting deinstall script:' echo '---> Zeroing crontab(5) file belonging to user "ifgraph"' /usr/bin/crontab -u ifgraph /dev/null echo ' (The crontab(5) will be deleted completely when user "ifgraph" is removed.)' ;; POST-DEINSTALL) echo '---> Starting post-deinstall script:' if [ -f /usr/local/etc/ifgraph.conf -o \ -d /usr/local/ifgraph -o \ -d /usr/local/var/ifgraph ]; then echo '---> You seem to have made some custom ifGraph configuration.' echo '---> - The "ifgraph" user and "ifgraph" group were therefore not deleted.' echo '---> - You may delete them with "pw groupdel ifgraph; pw userdel ifgraph".' else echo '---> Removing group "ifgraph"' /usr/sbin/pw groupdel -n ifgraph echo '---> Removing user "ifgraph"' echo 'y' | /usr/sbin/pw userdel -n ifgraph fi ;; esac