making the preinst and postinst scripts more complete, with backup and with smart stop/start of tomcat