diff --git a/debian/rules b/debian/rules
index f03ea275d4ece4ba1d2c291e7a351b78b8da754f..3c4cfd3a50c59f8d21ed3a90951318752aa1cfb0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,6 +23,7 @@ endif
 	mkdir -p debian/tmp/etc/i2p
 	mkdir -p debian/tmp/usr/share/i2p/lib
 	mkdir -p debian/tmp/usr/share/doc/i2p
+	mkdir -p debian/tmp/usr/share/man/man1
 	mkdir -p debian/tmp/usr/lib/i2p
 	mkdir -p debian/tmp/usr/bin
 	
@@ -60,6 +61,10 @@ endif
 	rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-GPLv2.txt
 	rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-LGPLv2.1.txt
 
+	@# man pages
+	gzip -9c installer/resources/man/eepget.1 > debian/tmp/usr/share/man/man1/eepget.1.gz
+	gzip -9c installer/resources/man/i2prouter.1 > debian/tmp/usr/share/man/man1/i2prouter.1.gz
+
 	@# copy wrapper files to /usr/lib/i2p (including wrapper.jar because it is architecture dependent)
 	cp ${wrapperpath}/libwrapper.so debian/tmp/usr/lib/i2p/
 	cp ${wrapperpath}/wrapper.jar debian/tmp/usr/lib/i2p/
diff --git a/debian/scripts/postinst b/debian/scripts/postinst
index 24ed3e3de3998da784230734eec9bfea76f5d504..f6d7c034b5959f574ecd73ada70298c6948c6be5 100755
--- a/debian/scripts/postinst
+++ b/debian/scripts/postinst
@@ -1,4 +1,6 @@
 #!/bin/sh
+set -e
+
 SVCHOME=/var/lib/i2p
 I2P=/usr/share/i2p
 I2PUSER=i2psvc
diff --git a/debian/scripts/postrm b/debian/scripts/postrm
index 38a4170ab1636e7ef9ba9fd9f06bf221305205f4..83f06ce7812d8126e111fc574b54a3e9e3fc272b 100755
--- a/debian/scripts/postrm
+++ b/debian/scripts/postrm
@@ -1,12 +1,14 @@
 #!/bin/sh
+set -e
 
 # /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)
-id $I2PUSER 2>/dev/null
-if [ $? -eq 0 ]; then
+# 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
 
diff --git a/debian/scripts/prerm b/debian/scripts/prerm
index 18c1f792825a5be4617cba436059a34b73210506..1777a4ecbaff77aa6aed273674d374c595aff723 100755
--- a/debian/scripts/prerm
+++ b/debian/scripts/prerm
@@ -1,4 +1,6 @@
 #!/bin/sh
+set -e
+
 invoke-rc.d i2p stop
 
 # stuff in /tmp
diff --git a/installer/resources/man/eepget.1 b/installer/resources/man/eepget.1
new file mode 100644
index 0000000000000000000000000000000000000000..d8509d4c6185f8e48a9a4d56ad2282c5f17248f3
--- /dev/null
+++ b/installer/resources/man/eepget.1
@@ -0,0 +1,53 @@
+.\"Created with GNOME Manpages Editor Wizard
+.\"http://sourceforge.net/projects/gmanedit2
+.TH Eepget 1 "November 13, 2010" "" "Eepget - I2P Downloader"
+
+.SH NAME
+Eepget \- I2P downloader
+
+.SH SYNOPSIS
+.B eepget
+.RI [ options ] URL
+.br
+
+.SH DESCRIPTION
+\fBEepget\fP downloads a file via HTTP through the I2P network. It handles .i2p URLs as well as URLs on the regular web such as .com.
+
+.SH OPTIONS
+.B
+\fB\-p\fR proxy_host:port
+.TP
+Sets the I2P proxy server (eeproxy) to use. The default is 127.0.0.1:4444.
+.TP
+
+.B
+\fB\-n\fR retries
+.TP
+Sets the number of retries if the download fails. The default is 3.
+.TP
+
+.B
+\fB\-o\fR file
+.TP
+Sets the output file to write to. If this option is not given, the URL determines the output filename.
+.TP
+
+.B
+\fB\-m\fR markSize lineLen
+.TP
+Controls the progress display. \fB\ markSize \fP is the number of bytes one '#' character represents. \fB\ lineLen \fP is the length of one progress line in characters. The defaults are 1024 and 40.
+.TP
+
+.B
+\fB\-t\fR seconds
+.TP
+Sets the inactivity timeout. The default is 60 seconds.
+.TP
+
+.SH "EXIT STATUS"
+
+\fB Eepget\fP always exits with the status 0.
+
+.SH "SEE ALSO"
+
+wget(1)
diff --git a/installer/resources/man/i2prouter.1 b/installer/resources/man/i2prouter.1
new file mode 100644
index 0000000000000000000000000000000000000000..e1ba8f6232ac720c15ff2e2c1848a14a7499f85d
--- /dev/null
+++ b/installer/resources/man/i2prouter.1
@@ -0,0 +1,38 @@
+.\"Created with GNOME Manpages Editor Wizard
+.\"http://sourceforge.net/projects/gmanedit2
+.TH i2prouter 1 "November 13, 2010" "" "I2PRouter"
+
+.SH NAME
+i2prouter \- start and stop the I2P router
+
+.SH SYNOPSIS
+.B i2prouter
+.RI { console | start | stop | restart | status | dump }
+.br
+
+.SH DESCRIPTION
+\fBi2prouter\fP controls the I2P service. It takes options similar to init scripts.
+
+.B
+.IP console
+Runs I2P as a console application under the current user.
+
+.B
+.IP start
+Starts the I2P service.
+
+.B
+.IP stop
+Stops the I2P service.
+
+.B
+.IP restart
+Stops the I2P service and then starts it.
+
+.B
+.IP status
+Prints whether the I2P service is running.
+
+.B
+.IP dump
+Dumps the current threads into\fB wrapper.log\fP.