Running syncthing permanently in background [answered]
After switching from btsync to Syncthing I am using now the systemd approach to keep it running in background as described here in the Syncthing documentation.
The problem now is, that the service gets stopped, when the phone goes into standby. Journalctl -u syncthing delivers this messages:
Jolla systemd[1]: INFO: Paused state detected, possibly woke up from standby
Jolla systemd[1]: INFO: Restarting
Jolla systemd[1]: OK: Exiting
Jolla systemd[1]: syncthing.service: main process exited, code=exited, status=3/NOTIMPLEMENTED
Jolla systemd[1]: Unit syncthing.service entered failed state.
Q: How can I avoid, that the service will be shutdown, even when the phone goes to standby?
My .service file in /etc/systemd/system/multi-user.target.wants/syncthing.service looks now like this:
[Unit]
Description=Syncthing service
After=network.target
[Service]
User=nemo
Environment=STNORESTART=yes
ExecStart=/usr/bin/syncthing
Restart=always
#Restart=on-success
RestartSec=1min
[Install]
WantedBy=multi-user.target
You need to keep a wake look active in order to prevent the device to go to deep sleep mode, one option is to use nemo-keepalive library for that: https://github.com/nemomobile/nemo-keepalive
VDVsx ( 2014-09-11 08:52:43 +0200 )editI think the best solution would be a small Qt app, utilizing this with a timer, depending on ongoing transfers or a time limit. I'm going to look into this, when i find some spare time in the next weeks. Who is interested: the Android Syncthing app (e.g. from F-Droid) works fine together with the systemd service (as far as i tested).
Icaruseffect ( 2014-09-17 12:33:07 +0200 )editInterestingly Syncthing is about to become Pulse and is being adopted by @aral's IndiePhone project at https://ind.ie/pulse/
Perhaps Jolla and Ind.ie have more in common and could work together?
aegis ( 2014-10-10 00:52:32 +0200 )edit