From 4b2768e5d177f38ec30379255787856cca399a35 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Tue, 12 Mar 2013 10:39:27 +0100 Subject: [PATCH] Default config file is not preconfigured for gateway mode --- spectrum/src/CMakeLists.txt | 8 ++- spectrum/src/sample2.cfg | 7 +- spectrum/src/sample2_gateway.cfg | 107 +++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 spectrum/src/sample2_gateway.cfg diff --git a/spectrum/src/CMakeLists.txt b/spectrum/src/CMakeLists.txt index f401f2b4..005fbb32 100644 --- a/spectrum/src/CMakeLists.txt +++ b/spectrum/src/CMakeLists.txt @@ -24,11 +24,17 @@ endif() INSTALL(TARGETS spectrum2 RUNTIME DESTINATION bin) INSTALL(FILES - sample2.cfg + sample2_gateway.cfg RENAME spectrum.cfg.example DESTINATION /etc/spectrum2/transports ) +INSTALL(FILES + sample2.cfg + RENAME spectrum_server_mode.cfg.example + DESTINATION /etc/spectrum2/transports + ) + INSTALL(FILES backend-logging.cfg DESTINATION /etc/spectrum2 diff --git a/spectrum/src/sample2.cfg b/spectrum/src/sample2.cfg index 5a91d5b8..5d96d391 100644 --- a/spectrum/src/sample2.cfg +++ b/spectrum/src/sample2.cfg @@ -6,14 +6,9 @@ server_mode = 1 #user=spectrum #group=spectrum -# JID of Spectrum instance. +# Hostname (JID) of this Spectrum 2 server mode instance. jid = localhost -# Password used to connect the XMPP server in gateway mode. -# In server mode, this option is ignored. -password = secret - -# XMPP server to which Spectrum connects in gateway mode. # To bind to all ipv4 interfaces, use server=0.0.0.0 server = 127.0.0.1 diff --git a/spectrum/src/sample2_gateway.cfg b/spectrum/src/sample2_gateway.cfg new file mode 100644 index 00000000..02bbb664 --- /dev/null +++ b/spectrum/src/sample2_gateway.cfg @@ -0,0 +1,107 @@ +[service] +# The name of user/group Spectrum runs as. +#user=spectrum +#group=spectrum + +# JID of Spectrum instance. +jid = icq.domain.tld + +# Password used to connect the XMPP server. +password = secret + +# XMPP server to which Spectrum connects in gateway mode. +server = 127.0.0.1 + +# XMPP server port. +port = 5222 + +# Interface on which Spectrum listens for backends. +backend_host = localhost + +# Port on which Spectrum listens for backends. +# By default Spectrum chooses random backend port and there's +# no need to change it normally +#backend_port=10001 + +# Number of users per one legacy network backend. +users_per_backend=10 + +# Full path to backend binary. +backend=/usr/bin/spectrum2_libpurple_backend +#backend=/usr/bin/spectrum2_libcommuni_backend +# For skype: +#backend=/usr/bin/xvfb-run -a -s "-screen 0 10x10x8" -f /tmp/x-skype-gw /usr/bin/spectrum2_skype_backend + +# Libpurple protocol-id for spectrum_libpurple_backend +protocol=prpl-jabber +#protocol=prpl-msn +#protocol=prpl-icq + +# prpl-any means that user sets his protocol in his JID which has to be +# in following format: protocol.username@domain.tld +# So for example: prpl-jabber.hanzz.k%gmail.com@domain.tld +#protocol=prpl-any + +[identity] +# Name of Spectrum instance in service discovery +name=Spectrum Jabber Transport + +# Type of transport ("msn", "icq", "xmpp"). +# Check http://xmpp.org/registrar/disco-categories.html#gateway +type=xmpp + +# Category of transport, default is "gateway +#category=gateway + +[logging] +# log4cxx/log4j logging configuration file in ini format used for main spectrum2 instance. +config = /etc/spectrum2/logging.cfg + +# log4cxx/log4j logging configuration file in ini format used for backends. +backend_config = /etc/spectrum2/backend-logging.cfg + +[database] +# Database backend type +# "sqlite3", "mysql", "pqxx", or "none" without database backend +type = sqlite3 + +# For SQLite3: Full path to database +# For MySQL and PostgreSQL: name of database +# default database = /var/lib/spectrum2/$jid/database.sql +#database = jabber_transport + +# Server. +#server = localhost + +# Port. +#port = 0 + +# User. +#user = spectrum + +# Paasword. +#password = secret + +# Prefix used for tables +#prefix = jabber_ + +# Connection string (for pqxx only!) +# If you set this, it ignores every other database option except for type and prefix. +#connectionstring = host=localhost user=specturm password=secret + +[registration] +# Enable public registrations +enable_public_registration=1 + +# Text to display upon user registration form +#username_label=Jabber JID (e.g. user@server.tld): +#instructions=Enter your remote jabber JID and password as well as your local username and password + +# If True a local jabber account on is needed +# for transport registration, the idea is to enable public registration +# from other servers, but only for users, who have already local accounts +#require_local_account=1 +#local_username_label=Local username (without @server.tld): +#local_account_server=localhost +#local_account_server_timeout=10000 +