if container is restarted dont add new cronjobs. Fixes #98

This commit is contained in:
Diego Lendoiro 2018-04-16 14:37:31 +02:00
parent d7888a43be
commit 5b52c86724
1 changed files with 4 additions and 3 deletions

View File

@ -74,9 +74,10 @@ email_cron_job() {
printenv > /etc/environment
sed -i 's/=\(.*\)/="\1"/g' /etc/environment
cron_task='/etc/cron.d/passbolt_email'
if [ ! -f "$cron_task" ]; then
echo "* * * * * su -c \"source /etc/environment ; /var/www/passbolt/bin/cake EmailQueue.sender\" -s /bin/bash www-data >> /var/log/cron.log 2>&1" >> $cron_task
crontab /etc/cron.d/passbolt_email
fi
}
if [ ! -f "$gpg_private_key" ] && [ ! -L "$gpg_private_key" ] || \