|
From: <abe...@us...> - 2013-01-08 16:04:58
|
Revision: 5876
http://astlinux.svn.sourceforge.net/astlinux/?rev=5876&view=rev
Author: abelbeck
Date: 2013-01-08 16:04:52 +0000 (Tue, 08 Jan 2013)
Log Message:
-----------
prosody, fix syslog logging syntax, fail to start if no SSL cert - override with XMPP_REQUIRE_SSL=no
Modified Paths:
--------------
branches/1.0/package/prosody/prosody.init
branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
Modified: branches/1.0/package/prosody/prosody.init
===================================================================
--- branches/1.0/package/prosody/prosody.init 2013-01-08 05:42:31 UTC (rev 5875)
+++ branches/1.0/package/prosody/prosody.init 2013-01-08 16:04:52 UTC (rev 5876)
@@ -89,14 +89,14 @@
admins = { $admins }
log = {
-${LOG_OK} $log = \"/var/log/prosody/prosody.log\",
-${SYSLOG_OK} $syslog = \"*syslog\",
-${ERROR_LOG} error = \"/var/log/prosody/prosody.err\",
+${LOG_OK} $log = \"/var/log/prosody/prosody.log\";
+${SYSLOG_OK} { levels = { min = \"$syslog\" }, to = \"syslog\" };
+${ERROR_LOG} error = \"/var/log/prosody/prosody.err\";
}
${SSL_OK}ssl = {
-${SSL_OK} certificate = \"$cert\",
-${SSL_OK} key = \"$key\",
+${SSL_OK} certificate = \"$cert\";
+${SSL_OK} key = \"$key\";
${SSL_OK}}
modules_enabled = { \"posix\", $modules }
@@ -109,6 +109,11 @@
if [ -n "$XMPP_CONFERENCE" ]; then
echo "Component \"$XMPP_CONFERENCE\" \"muc\""
fi
+
+ if [ -n "$SSL_OK" ]; then
+ return 1
+ fi
+ return 0
}
init () {
@@ -155,6 +160,12 @@
-- A manually generated prosody.cfg.lua config will use /mnt/kd/prosody/prosody.conf if it exists.
" >/mnt/kd/prosody/prosody.cfg.lua
gen_xmpp_config >>/mnt/kd/prosody/prosody.cfg.lua
+ if [ $? -ne 0 -a "$XMPP_REQUIRE_SSL" != "no" ]; then
+ logger -s -t prosody -p kern.info "XMPP SSL configuration error, failed to start."
+ logger -s -t prosody -p kern.info "Try generating an Asterisk SIP-TLS Server Certificate, which XMPP will use."
+ rm /mnt/kd/prosody/prosody.cfg.lua
+ return
+ fi
fi
chown prosody:prosody /mnt/kd/prosody/prosody.cfg.lua
Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2013-01-08 05:42:31 UTC (rev 5875)
+++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2013-01-08 16:04:52 UTC (rev 5876)
@@ -451,6 +451,7 @@
#XMPP_LOG="none" # Enable /var/log/prosody/prosody.log: "none", "warn", "info", "debug"
#XMPP_SYSLOG="warn" # Enable syslog logging: "none", "error", "warn", "info"
#XMPP_ERROR_LOG="no" # Enable error logging /var/log/prosody/prosody.err: "no", "yes"
+#XMPP_REQUIRE_SSL="yes" # Require SSL/TLS encryption, "no", "yes", defaults to "yes"
## Proxy ENV variables (http_proxy, ftp_proxy, etc.) for curl, wget, etc.
## Format: http://user:pass@proxyhost:proxyport"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|