Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
moodle_rebase10.1.2
Commits
a252ee73
Commit
a252ee73
authored
Aug 03, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include stunnel installation
parent
aeabbfa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
+49
-0
slapos/recipe/apache/__init__.py
slapos/recipe/apache/__init__.py
+36
-0
slapos/recipe/apache/template/stunnel.conf.entry.in
slapos/recipe/apache/template/stunnel.conf.entry.in
+3
-0
slapos/recipe/apache/template/stunnel.conf.in
slapos/recipe/apache/template/stunnel.conf.in
+10
-0
No files found.
slapos/recipe/apache/__init__.py
View file @
a252ee73
...
...
@@ -228,6 +228,42 @@ class Recipe(BaseSlapRecipe):
apache_conf
[
'pid_file'
]
+
' SIGUSR1'
)
return
apache_conf
def
installStunnel
(
self
,
service_dict
,
ca_certificate
,
key
,
ca_crl
,
ca_path
):
"""Installs stunnel
service_dict =
\
{ name: (public_ip, private_ip, public_port, private_port),}
"""
template_filename
=
self
.
getTemplateFilename
(
'stunnel.conf.in'
)
template_entry_filename
=
self
.
getTemplateFilename
(
'stunnel.conf.entry.in'
)
log
=
os
.
path
.
join
(
self
.
log_directory
,
'stunnel.log'
)
pid_file
=
os
.
path
.
join
(
self
.
run_directory
,
'stunnel.pid'
)
stunnel_conf
=
dict
(
pid_file
=
pid_file
,
log
=
log
,
cert
=
ca_certificate
,
key
=
key
,
ca_crl
=
ca_crl
,
ca_path
=
ca_path
,
entry_list
=
''
)
for
service
in
service_dict
:
# Get template_entry_filename and generate the entry_list
pass
stunnel_conf_path
=
self
.
createConfigurationFile
(
"stunnel.conf"
,
self
.
substituteTemplate
(
template_filename
,
stunnel_conf
))
wrapper
=
zc
.
buildout
.
easy_install
.
scripts
([(
'stunnel'
,
'slapos.recipe.librecipe.execute'
,
'execute_wait'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
[
[
self
.
options
[
'stunnel_binary'
].
strip
(),
stunnel_conf_path
],
[
ca_certificate
,
key
]]
)[
0
]
self
.
path_list
.
append
(
wrapper
)
return
stunnel_conf
def
installFrontendApache
(
self
,
ip_list
,
port
,
key
,
certificate
,
name
,
rewrite_rule_list
,
access_control_string
=
None
):
apachemap_name
=
"apachemap.txt"
...
...
slapos/recipe/apache/template/stunnel.conf.entry.in
0 → 100644
View file @
a252ee73
[%(name)s]
accept = %(public_ip)s:%(public_port)s
connect = %(private_ip)s:%(private_port)s
slapos/recipe/apache/template/stunnel.conf.in
0 → 100644
View file @
a252ee73
foreground = yes
output = %(log)s
pid = %(pid_file)s
syslog = no
CApath = %(ca_path)s
key = %(key)s
CRLpath = %(ca_crl)s
cert = %(cert)s
%(entry_list)s
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment