garychen Posted September 21, 2024 Report Posted September 21, 2024 I had already set up the user service, and Sync can be started with "systemctl --user start resilio-sync" "systemctl --user enable resilio-sync" also done. But Sync won't start automatically after reboot. I have to manually start Sync. I tried to put "systemctl --user start resilio-sync" in crontab but it won't start ether. OS: Linux Mint 22 x86_64, Kernel: 6.8.0-45-generic Quote
eltopo Posted September 21, 2024 Report Posted September 21, 2024 Check the log (using systemctl status / journalctl) and find out the reason why resilio sync service failed to start. If you are using USB device(s) as resilio sync's storage, you may need to wait the drive(s) get fully mounted before starting the service. If you are sure that after 1 minute the service can be started successfully, you can use a systemd timer unit for resilio sync's service with OnBootSec=60 see: systemd.timer By the way, executing "systemctl start" as a cron job is NOT the right place to properly start a systemd service. Quote
garychen Posted September 21, 2024 Author Report Posted September 21, 2024 Add delay in "/usr/lib/systemd/user/resilio-sync.service" solve the problem. Thanks. Quote
garychen Posted September 23, 2024 Author Report Posted September 23, 2024 I tried this on another linux mint machine and found that you also need to change "WantedBy=multi-user.target" to "WantedBy=default.target" in "/usr/lib/systemd/user/resilio-sync.service". Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.