Skip to content

Commit

Permalink
Update import-email-to-piler.service to include environment file and …
Browse files Browse the repository at this point in the history
…set working directory
  • Loading branch information
stephdl committed Apr 26, 2024
1 parent 88c2ccb commit 7096de8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
3 changes: 3 additions & 0 deletions imageroot/bin/import-emails
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import sys
import os
import agent

# test if the file sync2pilerdone exists, exit if it does
if os.path.exists('sync2pilerdone'):
sys.exit(0)

rdb = agent.redis_connect()

Expand Down
21 changes: 0 additions & 21 deletions imageroot/systemd/user/import-email-to-piler.service

This file was deleted.

2 changes: 1 addition & 1 deletion imageroot/systemd/user/piler-app.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Description=Podman piler-app.service
BindsTo=piler.service
After=piler.service mariadb-app.service memcached-app.service
Before=import-email-to-piler.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Expand All @@ -33,6 +32,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/piler-app.pid \
--env PILER_HOSTNAME=${TRAEFIK_HOST} \
--env MEMCACHED_HOST=127.0.0.1 \
${PILER_IMAGE}
ExecStartPost=/usr/local/bin/runagent import-emails
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/piler-app.ctr-id -t 10
ExecReload=/usr/local/bin/runagent expand-configuration
ExecReload=/usr/bin/podman kill -s HUP piler-app
Expand Down
4 changes: 2 additions & 2 deletions imageroot/systemd/user/piler.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

[Unit]
Description=Podman piler.service
Requires=mariadb-app.service piler-app.service memcached-app.service import-email-to-piler.service
Before=mariadb-app.service piler-app.service memcached-app.service import-email-to-piler.service
Requires=mariadb-app.service piler-app.service memcached-app.service
Before=mariadb-app.service piler-app.service memcached-app.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Expand Down

0 comments on commit 7096de8

Please sign in to comment.