linux user service won't start after reboot


garychen

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.