← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:launchpad-scripts-charm-fixes into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:launchpad-scripts-charm-fixes into launchpad:master.

Commit message:
charm/launchpad-scripts: Fix issues found during production deployment

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/448009
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:launchpad-scripts-charm-fixes into launchpad:master.
diff --git a/charm/launchpad-scripts/reactive/launchpad-scripts.py b/charm/launchpad-scripts/reactive/launchpad-scripts.py
index 99f37b8..7b64742 100644
--- a/charm/launchpad-scripts/reactive/launchpad-scripts.py
+++ b/charm/launchpad-scripts/reactive/launchpad-scripts.py
@@ -184,6 +184,10 @@ def configure():
         config["language_pack_exporter_schedule"]
     )
     configure_process_inbound_email(config)
+    # The checkwatches script logs to a 'checkwatches' sub-directory.
+    host.mkdir(
+        f"{base.logs_dir()}/checkwatches", group=base.user(), perms=0o775
+    )
     configure_cron(config, "crontab.j2")
     configure_celery(config)
     configure_number_cruncher(config)
diff --git a/charm/launchpad-scripts/templates/crontab.j2 b/charm/launchpad-scripts/templates/crontab.j2
index 57e054f..5292436 100644
--- a/charm/launchpad-scripts/templates/crontab.j2
+++ b/charm/launchpad-scripts/templates/crontab.j2
@@ -92,7 +92,7 @@ LPCONFIG=launchpad-scripts
 # Person notifications
 */5 * * * * {{ code_dir }}/cronscripts/send-person-notifications.py -q --log-file=INFO:{{ logs_dir }}/send-person-notifications.log
 
-{%- if process_inbound_email_host and process_inbound_email_user and process_inbound_email_password %}
+{%- if process_inbound_email_host and process_inbound_email_username and process_inbound_email_password %}
 # Process inbound email
 */3 * * * * {{ code_dir }}/cronscripts/process-mail.py -q --log-file=DEBUG:{{ logs_dir }}/process-mail.log
 {%- endif %}