diff options
| author | Haw Loeung <[email protected]> | 2025-07-16 21:32:25 +0000 |
|---|---|---|
| committer | Canonical IS Mergebot <[email protected]> | 2025-07-16 21:32:25 +0000 |
| commit | 1194e50316c7613adc9a6bb874b2e0ec77c2cb75 (patch) | |
| tree | 7153541df55c1e58811db27cfbe585f9166a88ba | |
| parent | 912cb650ab3c69b019645f5af31941471fd2a43a (diff) | |
| parent | 047921106985337a5935f26d542027dd1f37ef89 (diff) | |
Ensure SSL module enabled on config changed and not just on charm install
Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/+git/ubuntu-repository-cache/+merge/489049
Reviewed-by: Paul Collins <[email protected]>
| -rw-r--r-- | lib/ubuntu_repository_cache/apache.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ubuntu_repository_cache/apache.py b/lib/ubuntu_repository_cache/apache.py index 80a3ed1..27b670c 100644 --- a/lib/ubuntu_repository_cache/apache.py +++ b/lib/ubuntu_repository_cache/apache.py @@ -343,6 +343,11 @@ def render_configs(): # Package only in Trusty and below. subprocess.check_call(['a2dismod', 'mpm_worker']) subprocess.check_call(['a2enmod', 'mpm_prefork']) + if config.changed('enable-https'): + if config('enable-https'): + subprocess.check_call(['a2enmod', 'ssl']) + else: + subprocess.check_call(['a2dismod', 'ssl']) reload_required = create_metadata_site() or reload_required reload_required = create_mpm_workerfile() or reload_required |
