Skip to content

Commit

Permalink
Update import-email-to-piler.service to fix sync2pilerdone file check
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Apr 30, 2024
1 parent cc13ddb commit b89cd71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions imageroot/actions/configure-module/91import-email
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@
#

# This script is used to start the import-email-to-piler.service
if [[ -f 'sync2pilerdone' ]]; then
echo "## sync2pilerdone file is found, mail already migrated, exiting"
exit 0
fi
systemctl --user start --no-block import-email-to-piler.service
5 changes: 3 additions & 2 deletions imageroot/systemd/user/import-email-to-piler.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
[Unit]
Description= import emails to piler
Description=Import emails to Piler
ConditionPathExists=!%S/state/sync2pilerdone

[Service]
ExecStart=/usr/local/bin/runagent import-emails
ExecStart=/usr/bin/touch sync2pilerdone
ExecStart=/usr/bin/touch %S/state/sync2pilerdone
Type=oneshot

0 comments on commit b89cd71

Please sign in to comment.