Merge ~npochet/charm-nagios:fix-ssl into ~nagios-charmers/charm-nagios:master

Proposed by Nicolas Pochet
Status: Merged
Approved by: Tom Haddon
Approved revision: cdbbeb8c709361771f39982370a3cb26a63be15a
Merged at revision: cec6830a4a9dcbde6611c634fbd7f43fb69a2fdf
Proposed branch: ~npochet/charm-nagios:fix-ssl
Merge into: ~nagios-charmers/charm-nagios:master
Diff against target: 67 lines (+9/-7)
2 files modified
hooks/templates/default-ssl.tmpl (+2/-2)
hooks/upgrade-charm (+7/-5)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Stuart Bishop (community) Approve
Review via email: mp+366648@code.launchpad.net

Commit message

Fix typo for SSL

* Write ssl file to /etc/apache2/sites-available/default-ssl.conf
instead of /etc/apache2/sites-available/default-ssl
* Modify template to point to /var/www/html
* Fixes LP:1777904

Description of the change

Fix typo for SSL

* Write ssl file to /etc/apache2/sites-available/default-ssl.conf
instead of /etc/apache2/sites-available/default-ssl
* Modify template to point to /var/www/html
* Fixes LP:1777904

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Stuart Bishop (stub) wrote :

Looks all good to me.

review: Approve
Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision cec6830a4a9dcbde6611c634fbd7f43fb69a2fdf

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/hooks/templates/default-ssl.tmpl b/hooks/templates/default-ssl.tmpl
index 5344f38..1e8a5fb 100644
--- a/hooks/templates/default-ssl.tmpl
+++ b/hooks/templates/default-ssl.tmpl
@@ -3,12 +3,12 @@
3<VirtualHost _default_:443>3<VirtualHost _default_:443>
4 ServerAdmin webmaster@localhost4 ServerAdmin webmaster@localhost
55
6 DocumentRoot /var/www6 DocumentRoot /var/www/html
7 <Directory />7 <Directory />
8 Options FollowSymLinks8 Options FollowSymLinks
9 AllowOverride None9 AllowOverride None
10 </Directory>10 </Directory>
11 <Directory /var/www/>11 <Directory /var/www/html>
12 Options Indexes FollowSymLinks MultiViews12 Options Indexes FollowSymLinks MultiViews
13 AllowOverride None13 AllowOverride None
14 Order allow,deny14 Order allow,deny
diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
index d52cee5..bb2e494 100755
--- a/hooks/upgrade-charm
+++ b/hooks/upgrade-charm
@@ -107,7 +107,8 @@ def enable_livestatus_config():
107 os.chown(livestatus_dir, uid, gid)107 os.chown(livestatus_dir, uid, gid)
108 st = os.stat(livestatus_path)108 st = os.stat(livestatus_path)
109 os.chmod(livestatus_path, st.st_mode | stat.S_IRGRP)109 os.chmod(livestatus_path, st.st_mode | stat.S_IRGRP)
110 os.chmod(livestatus_dir, st.st_mode | stat.S_IRGRP | stat.S_ISGID | stat.S_IXUSR | stat.S_IXGRP)110 os.chmod(livestatus_dir, st.st_mode | stat.S_IRGRP |
111 stat.S_ISGID | stat.S_IXUSR | stat.S_IXGRP)
111112
112113
113def enable_pagerduty_config():114def enable_pagerduty_config():
@@ -141,7 +142,8 @@ def enable_pagerduty_config():
141 f2.write(t2.render(template_values))142 f2.write(t2.render(template_values))
142143
143 # Ship the pagerduty_nagios.pl script144 # Ship the pagerduty_nagios.pl script
144 shutil.copy('files/pagerduty_nagios.pl', '/usr/local/bin/pagerduty_nagios.pl')145 shutil.copy('files/pagerduty_nagios.pl',
146 '/usr/local/bin/pagerduty_nagios.pl')
145147
146 # Create the pagerduty queue dir148 # Create the pagerduty queue dir
147 if not os.path.isdir(pagerduty_path):149 if not os.path.isdir(pagerduty_path):
@@ -309,7 +311,7 @@ def update_apache():
309 templateDef = f.read()311 templateDef = f.read()
310312
311 t = Template(templateDef)313 t = Template(templateDef)
312 with open('/etc/apache2/sites-available/default-ssl', 'w') as f:314 with open('/etc/apache2/sites-available/default-ssl.conf', 'w') as f:
313 f.write(t.render(template_values))315 f.write(t.render(template_values))
314 print("Value of ssl is %s" % ssl)316 print("Value of ssl is %s" % ssl)
315 if ssl_config == "only":317 if ssl_config == "only":
@@ -337,12 +339,12 @@ def update_password(account, password):
337 with open(account_file, 'w') as f:339 with open(account_file, 'w') as f:
338 f.write(password)340 f.write(password)
339 subprocess.call(['htpasswd', '-b', '/etc/nagios3/htpasswd.users',341 subprocess.call(['htpasswd', '-b', '/etc/nagios3/htpasswd.users',
340 account, password])342 account, password])
341 else:343 else:
342 """ password was empty, it has been removed. We should delete the account """344 """ password was empty, it has been removed. We should delete the account """
343 os.path.isfile(account_file) and os.remove(account_file)345 os.path.isfile(account_file) and os.remove(account_file)
344 subprocess.call(['htpasswd', '-D', '/etc/nagios3/htpasswd.users',346 subprocess.call(['htpasswd', '-D', '/etc/nagios3/htpasswd.users',
345 account])347 account])
346348
347349
348warn_legacy_relations()350warn_legacy_relations()

Subscribers

People subscribed via source and target branches