Cron-apt updates don't show in webinterface

Hi,

I’m running syncthing via ppa on my BananaPi with Banaian (debian jessie) without problems. Updates install with cron-apt work fine. But when I log into the webinterface the previous version shows up (even some days after update!). I need to restart syncthing from webinterface to get the new version.

I even tried to “/etc/init.d/syncthing restart” in my crontab every night, but no effect here - strangely it works when I execute this statement interactively.

But I guess activating the new version should always work using apt.

Is there an old config value interfering with apt mechanism? I ran a non ppa version before and switched to ppa afterwards.

    <options>
        <listenAddress>tcp://0.0.0.0:22000</listenAddress>
        <globalAnnounceServer>default</globalAnnounceServer>
        <globalAnnounceEnabled>true</globalAnnounceEnabled>
        <localAnnounceEnabled>true</localAnnounceEnabled>
        <localAnnouncePort>21027</localAnnouncePort>
        <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
        <relayServer>dynamic+https://relays.syncthing.net/endpoint</relayServer>
        <maxSendKbps>0</maxSendKbps>
        <maxRecvKbps>0</maxRecvKbps>
        <reconnectionIntervalS>60</reconnectionIntervalS>
        <relaysEnabled>true</relaysEnabled>
        <relayReconnectIntervalM>10</relayReconnectIntervalM>
        <relayWithoutGlobalAnn>false</relayWithoutGlobalAnn>
        <startBrowser>false</startBrowser>
        <upnpEnabled>false</upnpEnabled>
        <upnpLeaseMinutes>60</upnpLeaseMinutes>
        <upnpRenewalMinutes>30</upnpRenewalMinutes>
        <upnpTimeoutSeconds>10</upnpTimeoutSeconds>
        <urAccepted>-1</urAccepted>
        <urUniqueID></urUniqueID>
        <urURL>https://data.syncthing.net/newdata</urURL>
        <urPostInsecurely>false</urPostInsecurely>
        <urInitialDelayS>1800</urInitialDelayS>
        <restartOnWakeup>true</restartOnWakeup>
        <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
        <keepTemporariesH>24</keepTemporariesH>
        <cacheIgnoredFiles>true</cacheIgnoredFiles>
        <progressUpdateIntervalS>5</progressUpdateIntervalS>
        <symlinksEnabled>true</symlinksEnabled>
        <limitBandwidthInLan>false</limitBandwidthInLan>
        <minHomeDiskFreePct>1</minHomeDiskFreePct>
        <releasesURL>https://api.github.com/repos/syncthing/syncthing/releases?per_page=30</releasesURL>
    </options>

Any ideas what I can try? Thanks & best regards Peter

Why not just use the official ARM release of github which autoupdates itself? I have a hunch that the reason the restart via service manager doesm’t do anything is because its executed as a different user under cron.

Is ppa and github version the same? So, if I remove syncthing from being updated via cron-apt it should respect the “autoupgradeinterval 12h” which is still in config? Or may this be the reason for a conflict between autoupdater and cron-apt?

The apt version has automatic upgrades disabled as it assumes you want to control that manually via the apt distribution.

There’s been some confusion about this. Maybe the package should make some attempt to restart running syncthings. Maybe Syncthing should periodically check if the binary has changed and restart on it’s own…

That’s a good idea. Maybe you could use the “autoupgradeinterval” for this check.

Maybe the file /etc/init.d/syncthing relies on some environmental variables - such as $PATH or $HOME, which aren’t set when executing from cron?

There’s an “init script” for Syncthing floating around that I’ve seen in a couple of places that is frankly crap. You may be suffering from that.

OMG: so easy… As I have only few, simple scripts in my crontab I never realized that I had no PATH environment. I just added PATH to crontab and now my daily restart works. Thanks a lot canton7!

And thanks to all others. As far as I’m concerned we can close this topic :smile:

It’s better to make your cronscripts work without needing an environment.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.