Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
1291ac93
Commit
1291ac93
authored
10 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Add the ability to turn on the twisted manhole telnet service.
parent
a664ec20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo/start.sh
+3
-2
3 additions, 2 deletions
demo/start.sh
synapse/app/homeserver.py
+10
-0
10 additions, 0 deletions
synapse/app/homeserver.py
with
13 additions
and
2 deletions
demo/start.sh
+
3
−
2
View file @
1291ac93
...
...
@@ -6,7 +6,7 @@ CWD=$(pwd)
cd
"
$DIR
/.."
for
port
in
"
8080
"
"
8081
"
"
8082
"
;
do
for
port
in
8080
8081
8082
;
do
echo
"Starting server on port
$port
... "
python
-m
synapse.app.homeserver
\
...
...
@@ -15,7 +15,8 @@ for port in "8080" "8081" "8082"; do
-f
"
$DIR
/
$port
.log"
\
-d
"
$DIR
/
$port
.db"
\
-vv
\
-D
--pid-file
"
$DIR
/
$port
.pid"
-D
--pid-file
"
$DIR
/
$port
.pid"
\
--manhole
$((
port
+
1000
))
done
echo
"Starting webclient on port 8000..."
...
...
This diff is collapsed.
Click to expand it.
synapse/app/homeserver.py
+
10
−
0
View file @
1291ac93
...
...
@@ -31,6 +31,7 @@ from synapse.api.urls import (
)
from
daemonize
import
Daemonize
import
twisted.manhole.telnet
import
argparse
import
logging
...
...
@@ -238,6 +239,8 @@ def setup():
default
=
"
hs.pid
"
)
parser
.
add_argument
(
"
-W
"
,
"
--webclient
"
,
dest
=
"
webclient
"
,
default
=
True
,
action
=
"
store_false
"
,
help
=
"
Don
'
t host a web client.
"
)
parser
.
add_argument
(
"
--manhole
"
,
dest
=
"
manhole
"
,
type
=
int
,
default
=
None
,
help
=
"
Turn on the twisted telnet manhole service.
"
)
args
=
parser
.
parse_args
()
verbosity
=
int
(
args
.
verbose
)
if
args
.
verbose
else
None
...
...
@@ -281,6 +284,13 @@ def setup():
hs
.
build_db_pool
()
if
args
.
manhole
:
f
=
twisted
.
manhole
.
telnet
.
ShellFactory
()
f
.
username
=
"
matrix
"
f
.
password
=
"
rabbithole
"
f
.
namespace
[
'
hs
'
]
=
hs
reactor
.
listenTCP
(
args
.
manhole
,
f
,
interface
=
'
127.0.0.1
'
)
if
args
.
daemonize
:
daemon
=
Daemonize
(
app
=
"
synapse-homeserver
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment