This repository has been archived by the owner on Nov 30, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0001-Changes-for-usage-of-insp-conf-discovery.patch
75 lines (67 loc) · 2.62 KB
/
0001-Changes-for-usage-of-insp-conf-discovery.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From d309ce8093b177fd4344ec1f700755230bc3e322 Mon Sep 17 00:00:00 2001
From: Sheogorath <[email protected]>
Date: Mon, 2 Jan 2017 05:28:16 +0000
Subject: [PATCH] Changes for usage of insp-conf-discovery
---
conf/inspircd.conf | 5 ++++-
conf/modules.conf | 5 +++--
conf/script.sh | 3 +++
3 files changed, 10 insertions(+), 3 deletions(-)
create mode 100755 conf/script.sh
diff --git a/conf/inspircd.conf b/conf/inspircd.conf
index 5f39166..298b9f0 100644
--- a/conf/inspircd.conf
+++ b/conf/inspircd.conf
@@ -1,12 +1,14 @@
<config format="xml">
+<include executable="conf/script.sh 2>/dev/null">
+
#-#-#-#-#-#-#-#-#-#-#-#- SERVER DESCRIPTION -#-#-#-#-#-#-#-#-#-#-#-#-
# #
# Here is where you enter the information about your server. #
# #
<server
- name="irc.example.com"
+ name="&hostname;.example.com"
description="InspIRCd IRC Server"
network="Omega">
@@ -28,6 +30,7 @@
<bind address="" port="7000" type="servers">
<bind address="" port="7001" type="servers" ssl="gnutls">
+<bind address="" port="8080" type="httpd">
#-#-#-#-#-#-#-#-#-#- CONNECTIONS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
# This is where you can configure which connections are allowed #
diff --git a/conf/modules.conf b/conf/modules.conf
index 9ee82c1..7929609 100644
--- a/conf/modules.conf
+++ b/conf/modules.conf
@@ -864,7 +864,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# httpd module: Provides HTTP server support for InspIRCd.
-#<module name="m_httpd.so">
+<module name="m_httpd.so">
#
#-#-#-#-#-#-#-#-#-#-#-#- HTTPD CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
#
@@ -874,8 +874,9 @@
#
# You can adjust the timeout for HTTP connections below. All HTTP
# connections will be closed after (roughly) this many seconds.
-#<httpd timeout="20">
+<httpd timeout="20">
+<module name="m_httpd_rehash.so">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# HTTP ACL module: Provides access control lists for m_httpd dependent
# modules. Use this module to restrict pages by IP address and by
diff --git a/conf/script.sh b/conf/script.sh
new file mode 100755
index 0000000..e6f0027
--- /dev/null
+++ b/conf/script.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "<define name=\"hostname\" value=\"`hostname`\">"
+wget -q -O- "http://${INSP_DISCOVERY:-discovery}:3000/conf/`hostname`/`certtool --load-certificate=conf/cert.pem --fingerprint --hash sha256`"
--
2.7.4