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
1diff --git a/hooks/templates/default-ssl.tmpl b/hooks/templates/default-ssl.tmpl
2index 5344f38..1e8a5fb 100644
3--- a/hooks/templates/default-ssl.tmpl
4+++ b/hooks/templates/default-ssl.tmpl
5@@ -3,12 +3,12 @@
6 <VirtualHost _default_:443>
7 ServerAdmin webmaster@localhost
8
9- DocumentRoot /var/www
10+ DocumentRoot /var/www/html
11 <Directory />
12 Options FollowSymLinks
13 AllowOverride None
14 </Directory>
15- <Directory /var/www/>
16+ <Directory /var/www/html>
17 Options Indexes FollowSymLinks MultiViews
18 AllowOverride None
19 Order allow,deny
20diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
21index d52cee5..bb2e494 100755
22--- a/hooks/upgrade-charm
23+++ b/hooks/upgrade-charm
24@@ -107,7 +107,8 @@ def enable_livestatus_config():
25 os.chown(livestatus_dir, uid, gid)
26 st = os.stat(livestatus_path)
27 os.chmod(livestatus_path, st.st_mode | stat.S_IRGRP)
28- os.chmod(livestatus_dir, st.st_mode | stat.S_IRGRP | stat.S_ISGID | stat.S_IXUSR | stat.S_IXGRP)
29+ os.chmod(livestatus_dir, st.st_mode | stat.S_IRGRP |
30+ stat.S_ISGID | stat.S_IXUSR | stat.S_IXGRP)
31
32
33 def enable_pagerduty_config():
34@@ -141,7 +142,8 @@ def enable_pagerduty_config():
35 f2.write(t2.render(template_values))
36
37 # Ship the pagerduty_nagios.pl script
38- shutil.copy('files/pagerduty_nagios.pl', '/usr/local/bin/pagerduty_nagios.pl')
39+ shutil.copy('files/pagerduty_nagios.pl',
40+ '/usr/local/bin/pagerduty_nagios.pl')
41
42 # Create the pagerduty queue dir
43 if not os.path.isdir(pagerduty_path):
44@@ -309,7 +311,7 @@ def update_apache():
45 templateDef = f.read()
46
47 t = Template(templateDef)
48- with open('/etc/apache2/sites-available/default-ssl', 'w') as f:
49+ with open('/etc/apache2/sites-available/default-ssl.conf', 'w') as f:
50 f.write(t.render(template_values))
51 print("Value of ssl is %s" % ssl)
52 if ssl_config == "only":
53@@ -337,12 +339,12 @@ def update_password(account, password):
54 with open(account_file, 'w') as f:
55 f.write(password)
56 subprocess.call(['htpasswd', '-b', '/etc/nagios3/htpasswd.users',
57- account, password])
58+ account, password])
59 else:
60 """ password was empty, it has been removed. We should delete the account """
61 os.path.isfile(account_file) and os.remove(account_file)
62 subprocess.call(['htpasswd', '-D', '/etc/nagios3/htpasswd.users',
63- account])
64+ account])
65
66
67 warn_legacy_relations()

Subscribers

People subscribed via source and target branches