Systemd file to restart Insync automatically [workaround]

Insync sometimes crashes and does not autostart again.

This systemd service file should take care of it (this is on KDE, you might want to change the last line to WantedBy=default.target or something your-desktop-environment specific):

[Unit]
Description=Insync Google Drive and Dropbox synchronizer
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
RemainAfterExit=yes
ExecStart=/usr/bin/insync start
ExecStop=/usr/bin/insync quit
Restart=on-failure
RestartSec=10

[Install]
WantedBy=plasma-workspace.target

Put it into ~/.config/systemd/user/insync.service

and run

systemctl --user daemon-reload
systemctl --user enable insync.service
systemctl --user start insync.service

And it will autostart on startup. You might want to remove what insync puts in /etc/xdg/autostart or whatever it uses to autostart. I wish Insync adapted it itself, systemd is meant for this.

1 Like

Thank you for sharing this in great detail, @drew. I will send this to our engineers and see if they have any input/feedback/further questions.