Debian package: Fix purge with no prior remove (rev. 9a8fca24502aa8933793f2bad48e327596a2c0d4 only fixed remove, then purge)
This commit is contained in:
13
debian/scripts/postrm
vendored
13
debian/scripts/postrm
vendored
@ -1,14 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# $1 is either "remove" or "purge". Since there are no config
|
|
||||||
# files left after a remove, exit here if called with "purge".
|
|
||||||
# This avoids calling userdel again which would cause an error.
|
|
||||||
if [ "$1" = "purge" ]; then
|
|
||||||
exit 0;
|
|
||||||
fi
|
|
||||||
|
|
||||||
I2PUSER=i2psvc
|
I2PUSER=i2psvc
|
||||||
exec userdel $I2PUSER
|
# delete $I2PUSER if it exists (it will not if this is a purge after a remove)
|
||||||
|
id $I2PUSER 2>/dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
exec userdel $I2PUSER
|
||||||
|
fi
|
||||||
|
|
||||||
# if somebody did updates in-network, there may be new files that dpkg
|
# if somebody did updates in-network, there may be new files that dpkg
|
||||||
# doesn't know about, so just to be sure
|
# doesn't know about, so just to be sure
|
||||||
|
Reference in New Issue
Block a user