Files
i2p.itoopie/debian/scripts/postrm

20 lines
488 B
Plaintext
Raw Normal View History

#!/bin/sh
set -e
2010-10-31 19:54:49 +00:00
# /etc/rc*.d/*i2p files
update-rc.d -f i2p remove
I2PUSER=i2psvc
# delete $I2PUSER if it exists (it will not if this is a purge after a remove)
# the "| cat" sets the exit code to zero so the script doesn't abort
entry=`getent passwd | cut -d: -f1 | grep i2psvc | cat`
if [ -n "$entry" ]; then
exec userdel $I2PUSER
fi
# if somebody did updates in-network, there may be new files that dpkg
# doesn't know about, so just to be sure
I2P=/usr/share/i2p
rm -rf $I2P