In short we need to stop all Zimbra services, restart LDAP and ConfigD, then do the update/upgrade, then restart all Zimbra services. I had to start looking for a solution like that when I did an update and Ubuntu failed to connect to remote repositories.
I typically login as "ubuntu" and do all server operations via sudo, including the update. I use this alias:
Code: Select all
alias update='sudo sh -c '\''apt-get update && apt-get upgrade --yes && if [ -f /var/run/reboot-required ]; then echo You should reboot; fi'\'' '
Code: Select all
sudo -u zimbra /opt/zimbra/bin/zmcontrol restart
Code: Select all
Starting opendkim...Failed.
opendkim: /opt/zimbra/conf/opendkim.conf: ldap://sub.sub.domain.tld:389/?DKIMSelector?sub?(DKIMIdentity=$d): dkimf_db_open(): Connect error
Failed to start opendkim: 0
Also, from user ubuntu, this actually does stop opendkim but returns the above error on start:
Code: Select all
sudo -u zimbra /opt/zimbra/bin/zmopendkimctl restart
To dd jut a little more, logswatch has exactly the same problem: starts fine when actually in user zimbra but returns a simple 'failed' message when started with zmcontrol restart above.
On one hand this seems like a Linux/Ubuntu question which could be applied to any similar request. On the other hand, I am wondering if there is something very Zimbra-specific going on, like maybe some other permissions are required that user zimbra gets but that aren't provided when shelling into the user like this. I'm really hoping someone else already has a working script just for updates like this.
Thanks!