hi, tell me, is it possible to configure the zmailboxdctl service so that when it falls, it restarts itself? The service crashes once a day.
Best regards, Dimon.
- Zimbra Collaboration 8.6 Patch 9 now available (includes fix for CVE-2017-8802). Read the announcement.
- Zimbra Collaboration 8.8.7 + Zimbra Connector for Outlook 8.8.7 are available.. Read the announcement.
- Are you a Zimbra Developer? You can find some interesting stuff in our Official GitHub: https://github.com/Zimbra and check the Community Projects too: https://github.com/Zimbra-Community/
Automatically restart the service
Re: Automatically restart the service
You should start by finding out why the service is failing and fix that problem, my server is up for months-on-end and I see no such problem with any ZCS services. Just restarting the service continually is not the answer to your problem but If you really want to go down the restart 'route' then you can use something like monit.
Regards
Bill
Rspamd: A high performance spamassassin replacement
If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
Bill
Rspamd: A high performance spamassassin replacement
If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
Re: Automatically restart the service
phoenix wrote:You should start by finding out why the service is failing and fix that problem, my server is up for months-on-end and I see no such problem with any ZCS services. Just restarting the service continually is not the answer to your problem but If you really want to go down the restart 'route' then you can use something like monit.
This is clear to me, what data should I provide to help me, because I don’t know how to fix it?
Best regards, Dimon
Re: Automatically restart the service
Who cares, here are your "crutches":
Two files
check_proc.sh
scr.sh
crontab -e
*/3 * * * * /bin/bash /opt/store/scr.sh > /tmp/backup.log 2>&1
It's works
Two files
check_proc.sh
Code: Select all
#!/bin/bash
ps_out=`/opt/zimbra/bin/zmcontrol status | grep $1 | grep -v 'grep' | grep -v $0`
result=$(echo $ps_out | grep "$1" | grep "$2")
if [[ "$result" != "" ]];then
echo "true"
else
echo "false"
fi
scr.sh
Code: Select all
#!/bin/bash
if [[ "$(/bin/sh /opt/store/check_proc.sh mailbox Running)" == "false" ]];then
/opt/zimbra/bin/zmmailboxdctl restart > /dev/null &
fi
crontab -e
*/3 * * * * /bin/bash /opt/store/scr.sh > /tmp/backup.log 2>&1
It's works
Who is online
Users browsing this forum: No registered users and 11 guests