Score:0

Issues launching SpiderOakONE on Ubuntu 22.04 LTS using Cron

no flag

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?

Marco avatar
br flag
`@reboot` means the start of the cron-daemon. Could it be, that this is started, before the network is up?
Marco avatar
br flag
The `start-stop-daemon` command needs `--start` as first option. Besides this, I think this is not the right command in this setting. Maybe remove the `start-stop-daemon` command might work even better.
Joe Moore avatar
no flag
`--start` is equivalent with `-S` no? I'll change it round. Also, how would I launch the executable without the `start-stop-daemon`? What would I use instead of the daemon? Would cron just recognise that `/usr/bin/SpiderOakONE` is an executable and start that?
Marco avatar
br flag
`@reboot sleep 5 && /usr/bin/SpiderOakONE` might work.
Joe Moore avatar
no flag
Thanks, will try - are you suggesting that cron will recognise that path as an executable?
Joe Moore avatar
no flag
@Marco I did that and it did the same thing in syslog. The kernel log then logged a lot of starting stuff that I dont remember it doing before. It seemed to activate network manager etc etc after the crontab. Should I increase the `sleep`? Or is there another cron hook I could use.
Marco avatar
br flag
If you have root access to the server you can use systemd with dependencies. Otherwise the easiest way is to increase the sleep. More sophisticated would be to check the network, e.g. with `systemd-networkd-wait-online`
Score:0
no flag

Turns out, SpiderOakONE has a built in --headless option you can add on launch.

@reboot sleep 60 && /usr/bin/SpiderOakONE --headless 2>&1 | logger -t SpiderOakLog

This was my final crontab. The 2>&1 ... part isn't necessary, it just allows the info/errors to be logged to syslog instead of an MTA error.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.