Hi zlamalp,
I faced the same issue when I wanted to put in place sync script.
I'm using the script given in link on this page :
https://docs.ubports.com/en/latest/userguide/advanceduse/dav.html
The script is on git repository :
https://gist.github.com/boTux/069b53d8e06bdb9b9c97
I don't know if the script you use is the same (line 27 is different).
Nevertheless, when I used this script, the sync doesn't work anymore after reboot of the phone.
It's because the following command :
DBUS_SESSION_BUS_ADDRESS=$(ps -u phablet e | grep -Eo 'dbus-daemon.*address=unix:abstract=/tmp/dbus-[A-Za-z0-9]{10}' | tail -c35)
doesn't return the same value after a reboot.
So you have to evaluate it after each reboot.
To do so, I changed the lines number 96 to 100 (in the script) by these ones :
CRON_FREQUENCY="hourly"
sudo mount / -o remount,rw
COMMAND_LINE="export DISPLAY=:0.0 && export DBUS_SESSION_BUS_ADDRESS=$(ps -u phablet e | grep -Eo 'dbus-daemon.*address=unix:abstract=/tmp/dbus-[A-Za-z0-9]{10}' | tail -c35) && /usr/bin/syncevolution $OC_DATABASE_NAME"
sudo sh -c "echo '$COMMAND_LINE' > /sbin/sogosync"
sudo chmod +x /sbin/sogosync
CRON_LINE="@$CRON_FREQUENCY /sbin/sogosync"
(crontab -u phablet -r;) # only if no other cronjob already exist in the crontab
(crontab -u phablet -l; echo "$CRON_LINE" ) | crontab -u phablet -
sudo mount / -o remount,ro
sudo service cron restart
With these modification, the value is evaluate et each reboot.
Hope it will help you,
Yannick