Abort if any command in the script exits with an error (lintian: maintainer-script-ignores-errors)
This commit is contained in:
2
debian/scripts/postinst
vendored
2
debian/scripts/postinst
vendored
@ -1,4 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
SVCHOME=/var/lib/i2p
|
SVCHOME=/var/lib/i2p
|
||||||
I2P=/usr/share/i2p
|
I2P=/usr/share/i2p
|
||||||
I2PUSER=i2psvc
|
I2PUSER=i2psvc
|
||||||
|
6
debian/scripts/postrm
vendored
6
debian/scripts/postrm
vendored
@ -1,12 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
# /etc/rc*.d/*i2p files
|
# /etc/rc*.d/*i2p files
|
||||||
update-rc.d -f i2p remove
|
update-rc.d -f i2p remove
|
||||||
|
|
||||||
I2PUSER=i2psvc
|
I2PUSER=i2psvc
|
||||||
# delete $I2PUSER if it exists (it will not if this is a purge after a remove)
|
# delete $I2PUSER if it exists (it will not if this is a purge after a remove)
|
||||||
id $I2PUSER 2>/dev/null
|
# the "| cat" sets the exit code to zero so the script doesn't abort
|
||||||
if [ $? -eq 0 ]; then
|
entry=`getent passwd | cut -d: -f1 | grep i2psvc | cat`
|
||||||
|
if [ -n "$entry" ]; then
|
||||||
exec userdel $I2PUSER
|
exec userdel $I2PUSER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
2
debian/scripts/prerm
vendored
2
debian/scripts/prerm
vendored
@ -1,4 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
invoke-rc.d i2p stop
|
invoke-rc.d i2p stop
|
||||||
|
|
||||||
# stuff in /tmp
|
# stuff in /tmp
|
||||||
|
Reference in New Issue
Block a user