diff --git a/actions/xmpp b/actions/xmpp
index 958190f56..66f27511d 100755
--- a/actions/xmpp
+++ b/actions/xmpp
@@ -26,13 +26,11 @@ import os
import shutil
import socket
import subprocess
-import re
import ruamel.yaml
from plinth import action_utils
-JWCHAT_CONFIG = '/etc/jwchat/config.js'
EJABBERD_CONFIG = '/etc/ejabberd/ejabberd.yml'
EJABBERD_BACKUP = '/var/log/ejabberd/ejabberd.dump'
EJABBERD_BACKUP_NEW = '/var/log/ejabberd/ejabberd_new.dump'
@@ -51,8 +49,8 @@ def parse_arguments():
'--domainname',
help='The domain name that will be used by the XMPP service.')
- # Setup jwchat apache conf
- subparsers.add_parser('setup', help='Setup jwchat apache conf')
+ # Setup ejabberd configuration
+ subparsers.add_parser('setup', help='Setup ejabberd configuration')
subparsers.add_parser('enable', help='Enable XMPP service')
subparsers.add_parser('disable', help='Disable XMPP service')
@@ -74,10 +72,10 @@ def parse_arguments():
hostname_change.add_argument('--new-hostname',
help='New hostname')
- # Update ejabberd and jwchat with new domainname
+ # Update ejabberd with new domainname
domainname_change = subparsers.add_parser(
'change-domainname',
- help='Update ejabberd and jwchat with new domainname')
+ help='Update ejabberd with new domainname')
domainname_change.add_argument('--domainname', help='New domainname')
return parser.parse_args()
@@ -93,13 +91,10 @@ def subcommand_pre_install(arguments):
subprocess.check_output(
['debconf-set-selections'],
input=b'ejabberd ejabberd/hostname string ' + domainname.encode())
- subprocess.check_output(
- ['debconf-set-selections'],
- input=b'jwchat jwchat/ApacheServerName string ' + domainname.encode())
def subcommand_setup(_):
- """Enabled LDAP authentication and setup jwchat apache conf"""
+ """Enabled LDAP authentication"""
with open(EJABBERD_CONFIG, 'r') as file_handle:
conf = ruamel.yaml.round_trip_load(file_handle, preserve_quotes=True)
@@ -121,7 +116,6 @@ def subcommand_setup(_):
print('Failed to restart ejabberd with new configuration: %s', err)
with action_utils.WebserverChange() as webserver_change:
- webserver_change.disable('jwchat', kind='site')
webserver_change.enable('jwchat-plinth')
@@ -158,7 +152,7 @@ def subcommand_pre_change_hostname(arguments):
def subcommand_change_hostname(arguments):
- """Update ejabberd and jwchat with new hostname"""
+ """Update ejabberd with new hostname"""
if not shutil.which('ejabberdctl'):
print('ejabberdctl not found. Is ejabberd installed?')
return
@@ -188,7 +182,7 @@ def subcommand_change_hostname(arguments):
def subcommand_change_domainname(arguments):
- """Update ejabberd and jwchat with new domainname"""
+ """Update ejabberd with new domainname"""
if not shutil.which('ejabberdctl'):
print('ejabberdctl not found. Is ejabberd installed?')
return
@@ -198,20 +192,6 @@ def subcommand_change_domainname(arguments):
# If new domainname is blank, use hostname instead.
domainname = socket.gethostname()
- # update jwchat's sitename, if it's installed
- if os.path.exists(JWCHAT_CONFIG):
- with open(JWCHAT_CONFIG, 'r') as conffile:
- lines = conffile.readlines()
- with open(JWCHAT_CONFIG, 'w') as conffile:
- for line in lines:
- if re.match(r'\s*var\s+SITENAME', line):
- conffile.write('var SITENAME = "' + domainname + '";\n')
- else:
- conffile.write(line)
- else:
- print('Skipping configuring jwchat sitename: %s not found',
- JWCHAT_CONFIG)
-
action_utils.service_stop('ejabberd')
subprocess.call(['pkill', '-u', 'ejabberd'])
diff --git a/data/etc/apache2/conf-available/jwchat-plinth.conf b/data/etc/apache2/conf-available/jwchat-plinth.conf
index b256b7c9c..4ef50ca0e 100644
--- a/data/etc/apache2/conf-available/jwchat-plinth.conf
+++ b/data/etc/apache2/conf-available/jwchat-plinth.conf
@@ -1,10 +1,4 @@
-Alias /jwchat /usr/share/jwchat/www
-
-