2009-01-30 22:32:52 +00:00
|
|
|
#!/bin/sh
|
2010-11-13 17:55:34 +00:00
|
|
|
set -e
|
2010-10-31 19:54:49 +00:00
|
|
|
|
2010-11-13 00:03:13 +00:00
|
|
|
# /etc/rc*.d/*i2p files
|
|
|
|
update-rc.d -f i2p remove
|
|
|
|
|
2010-01-26 15:21:41 +00:00
|
|
|
I2PUSER=i2psvc
|
2010-11-05 07:03:45 +00:00
|
|
|
# delete $I2PUSER if it exists (it will not if this is a purge after a remove)
|
2010-11-13 17:55:34 +00:00
|
|
|
# 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
|
2010-11-05 07:03:45 +00:00
|
|
|
exec userdel $I2PUSER
|
|
|
|
fi
|
2010-01-26 15:21:41 +00:00
|
|
|
|
|
|
|
# if somebody did updates in-network, there may be new files that dpkg
|
|
|
|
# doesn't know about, so just to be sure
|
2010-11-12 22:57:59 +00:00
|
|
|
I2P=/usr/share/i2p
|
2010-01-26 15:21:41 +00:00
|
|
|
rm -rf $I2P
|
|
|
|
|