Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768456
D401.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D401.diff
View Options
diff --git a/roles/shellserver/userland-software/files/etc__bitlbee__bitlbee.conf b/roles/shellserver/userland-software/files/etc__bitlbee__bitlbee.conf
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/userland-software/files/etc__bitlbee__bitlbee.conf
@@ -0,0 +1,159 @@
+## BitlBee default configuration file
+##
+## Comments are marked like this. The rest of the file is INI-style. The
+## comments should tell you enough about what all settings mean.
+##
+
+[settings]
+
+## RunMode:
+##
+## Inetd -- Run from inetd (default)
+## Daemon -- Run as a stand-alone daemon, serving all users from one process.
+## This saves memory if there are more users, the downside is that when one
+## user hits a crash-bug, all other users will also lose their connection.
+## ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate
+## child processes. This should be pretty safe and reliable to use instead
+## of inetd mode.
+##
+RunMode = ForkDaemon
+
+## User:
+##
+## If BitlBee is started by root as a daemon, it can drop root privileges,
+## and change to the specified user.
+##
+## DEBIAN NOTE: Without this, BitlBee will run as root!
+##
+User = bitlbee
+
+## DaemonPort/DaemonInterface:
+##
+## For daemon mode, you can specify on what interface and port the daemon
+## should be listening for connections.
+##
+## DEBIAN NOTE: The init script passes the -p flag to use the port number
+## set using debconf, this overrides the DaemonPort setting here.
+##
+DaemonInterface = 0.0.0.0
+DaemonPort = 12000
+
+## ClientInterface:
+##
+## If for any reason, you want BitlBee to use a specific address/interface
+## for outgoing traffic (IM connections, HTTP(S), etc.), set it here.
+##
+# ClientInterface = 0.0.0.0
+
+## AuthMode
+##
+## Open -- Accept connections from anyone, use NickServ for user authentication.
+## (default)
+## Closed -- Require authorization (using the PASS command during login) before
+## allowing the user to connect at all.
+## Registered -- Only allow registered users to use this server; this disables
+## the register- and the account command until the user identifies itself.
+##
+# AuthMode = Open
+
+## AuthPassword
+##
+## Password the user should enter when logging into a closed BitlBee server.
+## You can also have a BitlBee-style MD5 hash here. Format: "md5:", followed
+## by a hash as generated by "bitlbee -x hash <password>".
+##
+# AuthPassword = ItllBeBitlBee ## Heh.. Our slogan. ;-)
+## or
+# AuthPassword = md5:gzkK0Ox/1xh+1XTsQjXxBJ571Vgl
+
+## OperPassword
+##
+## Password that unlocks access to special operator commands.
+##
+# OperPassword = ChangeMe!
+## or
+# OperPassword = md5:I0mnZbn1t4R731zzRdDN2/pK7lRX
+
+## HostName
+##
+## Normally, BitlBee gets a hostname using getsockname(). If you have a nicer
+## alias for your BitlBee daemon, you can set it here and BitlBee will identify
+## itself with that name instead.
+##
+# HostName = localhost
+
+## MotdFile
+##
+## Specify an alternative MOTD (Message Of The Day) file. Default value depends
+## on the --etcdir argument to configure.
+##
+# MotdFile = /etc/bitlbee/motd.txt
+
+## ConfigDir
+##
+## Specify an alternative directory to store all the per-user configuration
+## files. (.nicks/.accounts)
+##
+# ConfigDir = /var/lib/bitlbee
+
+## Ping settings
+##
+## BitlBee can send PING requests to the client to check whether it's still
+## alive. This is not very useful on local servers, but it does make sense
+## when most clients connect to the server over a real network interface.
+## (Public servers) Pinging the client will make sure lost clients are
+## detected and cleaned up sooner.
+##
+## PING requests are sent every PingInterval seconds. If no PONG reply has
+## been received for PingTimeOut seconds, BitlBee aborts the connection.
+##
+## To disable the pinging, set at least one of these to 0.
+##
+# PingInterval = 180
+# PingTimeOut = 300
+
+## Using proxy servers for outgoing connections
+##
+## If you're running BitlBee on a host which is behind a restrictive firewall
+## and a proxy server, you can tell BitlBee to use that proxy server here.
+## The setting has to be a URL, formatted like one of these examples:
+##
+## (Obviously, the username and password are optional)
+##
+# Proxy = http://john:doe@proxy.localnet.com:8080
+# Proxy = socks4://socksproxy.localnet.com
+# Proxy = socks5://socksproxy.localnet.com
+
+## Protocols offered by bitlbee
+##
+## As recompiling may be quite unpractical for some people, this option
+## allows to remove the support of protocol, even if compiled in. If
+## nothing is given, there are no restrictions.
+##
+# Protocols = jabber yahoo
+
+## Trusted CAs
+##
+## Path to a file containing a list of trusted certificate authorities used in
+## the verification of server certificates.
+##
+## Uncomment this and make sure the file actually exists and contains all
+## certificate authorities you're willing to accept (default value should
+## work on at least Debian/Ubuntu systems with the "ca-certificates" package
+## installed). As long as the line is commented out, SSL certificate
+## verification is completely disabled.
+##
+## The location of this file may be different on other distros/OSes. For
+## example, try /etc/ssl/ca-bundle.pem on OpenSUSE.
+##
+# CAfile = /etc/ssl/certs/ca-certificates.crt
+
+[defaults]
+
+## Here you can override the defaults for some per-user settings. Users are
+## still able to override your defaults, so this is not a way to restrict
+## your users...
+
+## To enable private mode by default, for example:
+
+## private = 1
diff --git a/roles/shellserver/userland-software/files/etc__init.d__bitlbee b/roles/shellserver/userland-software/files/etc__init.d__bitlbee
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/userland-software/files/etc__init.d__bitlbee
@@ -0,0 +1,88 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: bitlbee
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop BitlBee IRC to other chat networks gateway
+### END INIT INFO
+#
+#
+# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="BitlBee IRC/IM gateway"
+NAME=bitlbee
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Gracefully exit if the package has been removed.
+[ -x $DAEMON ] || exit 0
+
+# Default value
+BITLBEE_PORT=12000
+BITLBEE_OPTS=-F
+
+# Read config file if it is present.
+if [ -r /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ # Make sure BitlBee can actually write its PID...
+ touch $PIDFILE
+ chown bitlbee: $PIDFILE
+
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --name $NAME
+}
+
+
+case "$1" in
+ start)
+ [ "$BITLBEE_DISABLED" = "1" ] && exit 0
+
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ #reload)
+ #
+ # No reload target, but there's a REHASH command which we
+ # might use later...
+ #
+ #;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/roles/shellserver/userland-software/irc.sls b/roles/shellserver/userland-software/irc.sls
--- a/roles/shellserver/userland-software/irc.sls
+++ b/roles/shellserver/userland-software/irc.sls
@@ -61,3 +61,25 @@
- name: {{ dirs.etc }}/oidentd.conf
- source: salt://roles/shellserver/userland-software/files/oidentd.conf
- mode: 644
+
+# -------------------------------------------------------------
+# Bitlbee configuration
+# -------------------------------------------------------------
+
+/etc/bitlbee/bitlbee.conf:
+ file:
+ - managed
+ - source: salt://roles/shellserver/userland-software/files/etc__bitlbee__bitlbee.conf
+ - user: root
+ - group: bitlbee
+ - mode: 640
+
+# On Debian, port is ignored from the configuration file,
+# as init script uses -p <port>, so we change init script too.
+
+{% if grains['os'] == 'Debian' %}
+/etc/init.d/bitlbee:
+ file:
+ - managed
+ - source: salt://roles/shellserver/userland-software/files/etc__init.d__bitlbee
+{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 08:05 (9 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258705
Default Alt Text
D401.diff (8 KB)
Attached To
Mode
D401: WIP: bitlbee port
Attached
Detach File
Event Timeline
Log In to Comment