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
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
Aurel
slapos
Commits
42a86cde
Commit
42a86cde
authored
Oct 08, 2015
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor2: add monitor password promise
parent
2ef65f6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
stack/monitor2/buildout.cfg
stack/monitor2/buildout.cfg
+7
-1
stack/monitor2/instance-monitor.cfg.jinja2.in
stack/monitor2/instance-monitor.cfg.jinja2.in
+11
-0
stack/monitor2/monitor-password-promise.py.in
stack/monitor2/monitor-password-promise.py.in
+14
-0
No files found.
stack/monitor2/buildout.cfg
View file @
42a86cde
...
@@ -106,12 +106,13 @@ recipe = slapos.recipe.template:jinja2
...
@@ -106,12 +106,13 @@ recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
rendered = ${buildout:directory}/template-monitor.cfg
md5sum =
fde8b1c9ff04c64a3b7bb0ae11ffe0c5
md5sum =
07504e9bccb50ff17945363f7440472e
context =
context =
key apache_location apache:location
key apache_location apache:location
key gzip_location gzip:location
key gzip_location gzip:location
raw monitor_bin ${monitor-bin:location}/${monitor-bin:filename}
raw monitor_bin ${monitor-bin:location}/${monitor-bin:filename}
raw monitor_conf_template ${monitor-conf:location}/${monitor-conf:filename}
raw monitor_conf_template ${monitor-conf:location}/${monitor-conf:filename}
raw monitor_password_promise_template ${monitor-password-promise:location}/${monitor-password-promise:filename}
raw monitor_web_default_promise_interface ${monitor-web-default-promise-interface:location}/${monitor-web-default-promise-interface:filename}
raw monitor_web_default_promise_interface ${monitor-web-default-promise-interface:location}/${monitor-web-default-promise-interface:filename}
raw monitor_web_index_html ${monitor-web-index-html:location}/${monitor-web-index-html:filename}
raw monitor_web_index_html ${monitor-web-index-html:location}/${monitor-web-index-html:filename}
raw monitor_web_monitor_css ${monitor-web-monitor-css:location}/${monitor-web-monitor-css:filename}
raw monitor_web_monitor_css ${monitor-web-monitor-css:location}/${monitor-web-monitor-css:filename}
...
@@ -201,6 +202,11 @@ destination = ${buildout:parts-directory}/monitor-template-settings-cgi
...
@@ -201,6 +202,11 @@ destination = ${buildout:parts-directory}/monitor-template-settings-cgi
filename = settings.cgi.in
filename = settings.cgi.in
mode = 0644
mode = 0644
[monitor-password-promise]
<= monitor-download-base
filename = monitor-password-promise.py.in
md5sum = 0a9a42551ed6bdb973fd1f0dd1d4ec86
[monitor-password-cgi]
[monitor-password-cgi]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfile-directory/${:filename}
url = ${:_profile_base_location_}/webfile-directory/${:filename}
...
...
stack/monitor2/instance-monitor.cfg.jinja2.in
View file @
42a86cde
...
@@ -271,6 +271,16 @@ frequency = * * * * *
...
@@ -271,6 +271,16 @@ frequency = * * * * *
public-path-list = ${monitor-httpd-conf-parameter:access-log} ${monitor-httpd-conf-parameter:error-log}
public-path-list = ${monitor-httpd-conf-parameter:access-log} ${monitor-httpd-conf-parameter:error-log}
#private-path-list =
#private-path-list =
[monitor-password-promise]
recipe = slapos.recipe.template:jinja2
template = {{ monitor_password_promise_template }}
rendered = ${directory:monitor-promise}/${:filename}
filename = monitor-password
mode = 0755
context =
raw python_executable {{ python_executable }}
raw password_changed_once_path ${directory:var}/monitor-password-changed-once
[publish]
[publish]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
monitor-url = ${monitor-httpd-conf-parameter:url}
monitor-url = ${monitor-httpd-conf-parameter:url}
...
@@ -294,4 +304,5 @@ parts =
...
@@ -294,4 +304,5 @@ parts =
ca-httpd
ca-httpd
monitor-httpd-promise
monitor-httpd-promise
monitor-httpd-promise-conf
monitor-httpd-promise-conf
monitor-password-promise
publish
publish
stack/monitor2/monitor-password-promise.py.in
0 → 100644
View file @
42a86cde
#!{{ python_executable }}
password_changed_once_path = "{{ password_changed_once_path }}"
import os
def main():
if os.path.exists(password_changed_once_path):
print('{"status":"OK"}')
return 0
print('{"status":"BAD","message":"Password never changed"}')
return 1
if __name__ == "__main__":
exit(main())
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