Print an error if /etc/init.d/i2p is run as non-root so Ubuntu users aren't asked for a non-existing root password

This commit is contained in:
HungryHobo
2010-10-31 19:48:41 +00:00
parent 56ef384595
commit 148ce25af7

5
debian/scripts/init vendored
View File

@ -17,6 +17,11 @@ I2P () {
su i2psvc -c "/usr/lib/i2p/i2prouter $1"
}
if [ `id -un` != "root" ]; then
echo "This script ($0) must be run as root"
exit 1
fi
case "$1" in
start)
log_daemon_msg "Starting I2P" "i2p"