I have an instance of Ubuntu 22.04 LTS running on a server. I need SpiderOakONE to launch automatically on reboot without the user having to log in. I decided this would be best suited to cron. I created a crontab for my current user using crontab -e
and added this line:
@reboot sleep 5 && /sbin/start-stop-daemon -b -x /usr/bin/SpiderOakONE -S
The systemd cron service is active and my syslog says that cron starts the job but nothing else. There are no error logs or info logs related to SpiderOakONE.
To test, I rebooted my server and waited a few minutes before testing whether the server will sync with SpiderOakONE and it did not work.
Is the cron job set correctly? Am I perhaps not waiting long enough for SpiderOak to start? It takes a good long time to sync when a user logs into the server so perhaps thats happening but I'm really not sure.
Any suggestions?
@reboot
means the start of the cron-daemon. Could it be, that this is started, before the network is up?start-stop-daemon
command needs--start
as first option. Besides this, I think this is not the right command in this setting. Maybe remove thestart-stop-daemon
command might work even better.--start
is equivalent with-S
no? I'll change it round. Also, how would I launch the executable without thestart-stop-daemon
? What would I use instead of the daemon? Would cron just recognise that/usr/bin/SpiderOakONE
is an executable and start that?@reboot sleep 5 && /usr/bin/SpiderOakONE
might work.systemd-networkd-wait-online