diff --git a/Makefile b/Makefile
index 9ab77cbeb..e5cf9f31d 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@ install: default apache-install freedombox-setup-install
cp -a sudoers.d $(DESTDIR)/etc/sudoers.d
cp -a *.py modules templates $(DESTDIR)$(PYDIR)/
cp share/init.d/plinth $(DESTDIR)/etc/init.d
+ cp -a lib/* $(DESTDIR)/usr/lib
install plinth $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/var/lib/plinth/cherrypy_sessions $(DESTDIR)/var/log/plinth $(DESTDIR)/var/run
mkdir -p $(DESTDIR)/var/lib/plinth/data
diff --git a/lib/firewalld/services/xmpp-bosh.xml b/lib/firewalld/services/xmpp-bosh.xml
new file mode 100644
index 000000000..039f9cc3b
--- /dev/null
+++ b/lib/firewalld/services/xmpp-bosh.xml
@@ -0,0 +1,6 @@
+
+
+ XMPP (Jabber) web client
+ Extensible Messaging and Presence Protocol (XMPP) web client protocol allows web based chat clients such as JWChat to connect to the XMPP (Jabber) server. This is also know as the Bidirectional-streams Over Synchronous HTTP (BOSH) protocol. Enable this if you run an XMPP (Jabber) server and you wish web clients to connect to your server.
+
+
diff --git a/lib/firewalld/services/xmpp-client.xml b/lib/firewalld/services/xmpp-client.xml
new file mode 100644
index 000000000..d31bd537c
--- /dev/null
+++ b/lib/firewalld/services/xmpp-client.xml
@@ -0,0 +1,6 @@
+
+
+ XMPP (Jabber) client
+ Extensible Messaging and Presence Protocol (XMPP) client connection protocol allows XMPP (Jabber) clients such as Empathy, Pidgin, Kopete and Jitsi to connect to an XMPP (Jabber) server. Enable this if you run an XMPP (Jabber) server and you wish clients to be able to connect to the server and communicate with each other.
+
+
diff --git a/lib/firewalld/services/xmpp-server.xml b/lib/firewalld/services/xmpp-server.xml
new file mode 100644
index 000000000..3656d96da
--- /dev/null
+++ b/lib/firewalld/services/xmpp-server.xml
@@ -0,0 +1,6 @@
+
+
+ XMPP (Jabber) server
+ Extensible Messaging and Presence Protocol (XMPP) server connection protocols allows multiple XMPP (Jabber) servers to work in a fedrated fashion. Users on one server will be able to see the presence of and communicate with users on another servers. Enable this if you run an XMPP (Jabber) server and you wish users on your server to communicate with users on other XMPP servers.
+
+
diff --git a/modules/installed/services/xmpp.py b/modules/installed/services/xmpp.py
index f3d48ad7a..858137af8 100644
--- a/modules/installed/services/xmpp.py
+++ b/modules/installed/services/xmpp.py
@@ -5,6 +5,7 @@ from plugin_mount import PagePlugin, FormPlugin
import cfg
from forms import Form
import actions
+import service
from util import Message
class xmpp(PagePlugin):
@@ -15,6 +16,24 @@ class xmpp(PagePlugin):
self.register_page("services.xmpp.register")
cfg.html_root.services.menu.add_item("XMPP", "icon-comment", "/services/xmpp", 40)
+ self.client_service = service.Service(
+ 'xmpp-client', _('Chat Server - client connections'), enabled=True)
+ self.server_service = service.Service(
+ 'xmpp-server', _('Chat Server - server connections'), enabled=True)
+ self.bosh_service = service.Service(
+ 'xmpp-bosh', _('Chat Server - web interface'), enabled=True)
+
+ # XXX: This is not correct. This essentially triggers firewall
+ # to enable XMPP ports. This happen on every start of
+ # Plinth. XMPP should be an option to be enabled on Plinth. If
+ # and when the user enables the following notifications must
+ # sent. If XMPP has be on by default in FreedomBox, then
+ # initial setup process that sets up XMPP also must open the
+ # firewall ports by default.
+ self.client_service.notify_enabled(self, enabled=True)
+ self.server_service.notify_enabled(self, enabled=True)
+ self.bosh_service.notify_enabled(self, enabled=True)
+
@cherrypy.expose
@require()
def index(self, **kwargs):