Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list existing cron jobs for redmine user
- crontab -u redmine -l 2>/dev/null >/tmp/cron.redmine
- # add new job for recurring tasks if it does not exist
- if ! grep -q redmine:email:receive_imap /tmp/cron.redmine; then
- echo '*/1 * * * * cd /home/redmine/redmine && bundle exec rake redmine:email:receive_imap host=imap.mapazdrowia.pl port=993 ssl=true username=task2@mapazdrowia.pl password=3yxAHh1bQ0x unknown_user=ignore no_permission_check=0 no_account_notice=true project=mz tracker=bug RAILS_ENV=production > /home/redmine/redmine-email.log 2>&1' >>/tmp/cron.redmine
- crontab -u redmine /tmp/cron.redmine 2>/dev/null
- fi
- # remove the temporary file
- rm -rf /tmp/cron.redmine
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement