Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
185ad573
Commit
185ad573
authored
Oct 22, 2012
by
Viktor Horvath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mioga2 Notifier works (for example: updating a gallery.)
parent
59fdcbf3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
340 deletions
+60
-340
slapos/recipe/mioga/instantiate.py
slapos/recipe/mioga/instantiate.py
+28
-7
software/mioga/instance-apacheperl.cfg
software/mioga/instance-apacheperl.cfg
+1
-1
software/mioga/mioga-patch
software/mioga/mioga-patch
+31
-332
No files found.
slapos/recipe/mioga/instantiate.py
View file @
185ad573
...
@@ -75,8 +75,10 @@ class Recipe(GenericBaseRecipe):
...
@@ -75,8 +75,10 @@ class Recipe(GenericBaseRecipe):
fm
.
modify
(
'maildir'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'maildir'
))
fm
.
modify
(
'maildir'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'maildir'
))
fm
.
modify
(
'maildirerror'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'error'
))
fm
.
modify
(
'maildirerror'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'error'
))
fm
.
modify
(
'mailfifo'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'fifo'
))
fm
.
modify
(
'mailfifo'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'fifo'
))
fm
.
modify
(
'notifierfifo'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'notifier'
))
notifier_fifo
=
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'notifier'
)
fm
.
modify
(
'searchenginefifo'
,
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'searchengine'
))
fm
.
modify
(
'notifierfifo'
,
notifier_fifo
)
searchengine_fifo
=
os
.
path
.
join
(
vardir
,
'spool'
,
'mioga'
,
'searchengine'
)
fm
.
modify
(
'searchenginefifo'
,
searchengine_fifo
)
fm
.
modify
(
'dbi_passwd'
,
self
.
options
[
'db_password'
])
fm
.
modify
(
'dbi_passwd'
,
self
.
options
[
'db_password'
])
fm
.
modify
(
'db_host'
,
self
.
options
[
'db_host'
])
fm
.
modify
(
'db_host'
,
self
.
options
[
'db_host'
])
fm
.
modify
(
'db_port'
,
self
.
options
[
'db_port'
])
fm
.
modify
(
'db_port'
,
self
.
options
[
'db_port'
])
...
@@ -89,6 +91,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -89,6 +91,7 @@ class Recipe(GenericBaseRecipe):
if
os
.
path
.
isdir
(
'web/conf/apache'
):
if
os
.
path
.
isdir
(
'web/conf/apache'
):
shutil
.
rmtree
(
'web/conf/apache'
)
shutil
.
rmtree
(
'web/conf/apache'
)
environ
=
os
.
environ
environ
=
os
.
environ
environ
[
'PATH'
]
=
':'
.
join
([
self
.
options
[
'perl_bin'
],
# priority!
environ
[
'PATH'
]
=
':'
.
join
([
self
.
options
[
'perl_bin'
],
# priority!
self
.
options
[
'mioga_add_to_path'
],
self
.
options
[
'mioga_add_to_path'
],
...
@@ -189,12 +192,30 @@ Include conf/extra/httpd-autoindex.conf
...
@@ -189,12 +192,30 @@ Include conf/extra/httpd-autoindex.conf
# )
# )
path_list
.
append
(
os
.
path
.
abspath
(
self
.
options
[
'httpd_conf'
]))
path_list
.
append
(
os
.
path
.
abspath
(
self
.
options
[
'httpd_conf'
]))
wrapper
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
services_dir
=
self
.
options
[
'services_dir'
]
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'httpd_binary'
],
'-f'
,
self
.
options
[
'httpd_conf'
],
httpd_wrapper
=
self
.
createPythonScript
(
'-DFOREGROUND'
]
os
.
path
.
join
(
services_dir
,
'httpd_wrapper'
),
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'httpd_binary'
],
'-f'
,
self
.
options
[
'httpd_conf'
],
'-DFOREGROUND'
]
)
path_list
.
append
(
httpd_wrapper
)
for
fifo
in
[
notifier_fifo
,
searchengine_fifo
]:
if
os
.
path
.
exists
(
fifo
):
if
not
stat
.
S_ISFIFO
(
os
.
stat
(
fifo
).
st_mode
):
raise
Exception
(
"The file "
+
fifo
+
" exists but is not a FIFO."
)
else
:
os
.
mkfifo
(
fifo
,
0600
)
notifier_wrapper
=
self
.
createPythonScript
(
os
.
path
.
join
(
services_dir
,
'notifier_wrapper'
),
'slapos.recipe.librecipe.execute.execute'
,
[
os
.
path
.
join
(
self
.
options
[
'mioga_compile_dir'
],
'bin'
,
'notifier'
,
'notifier.pl'
),
os
.
path
.
join
(
mioga_base
,
'conf'
,
'Mioga.conf'
)
]
)
)
path_list
.
append
(
wrapper
)
path_list
.
append
(
notifier_
wrapper
)
if
os
.
path
.
exists
(
self
.
options
[
'pid_file'
]):
if
os
.
path
.
exists
(
self
.
options
[
'pid_file'
]):
# Reload apache configuration
# Reload apache configuration
...
...
software/mioga/instance-apacheperl.cfg
View file @
185ad573
...
@@ -78,6 +78,6 @@ httpd_conf = $${rootdirectory:etc}/httpd.conf
...
@@ -78,6 +78,6 @@ httpd_conf = $${rootdirectory:etc}/httpd.conf
pid_file = $${basedirectory:services}/apache.pid
pid_file = $${basedirectory:services}/apache.pid
lock_file = $${basedirectory:services}/apache.lock
lock_file = $${basedirectory:services}/apache.lock
dav_locks = $${rootdirectory:var}/dav_locks
dav_locks = $${rootdirectory:var}/dav_locks
wrapper = $${basedirectory:services}/httpd_wrapper
services_dir = $${basedirectory:services}
error_log = $${rootdirectory:log}/error.log
error_log = $${rootdirectory:log}/error.log
access_log = $${rootdirectory:log}/access.log
access_log = $${rootdirectory:log}/access.log
software/mioga/mioga-patch
View file @
185ad573
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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