I am still struggling to create a working rc.d script for onedrive. covacat has explained that I need to explicitly define environment variables, but now I am facing another issue:
rc.d starts
Is rc.d actually meant only for programs that are already daemons? Or can I use rc.d to daemonize any non-daemon program?
I tried to use the daemon command explicitly, and created a shell script:
but I am not sure if it works. "Nothing" happens, and neither
nor
gives me any indication that onedrive is running.
Is it a proper approach?
rc.d starts
onedrive
exactly as it should, but the program starts and stays in the foreground. Meaning: During the boot process the output from onedrive
flushes the screen, and then it "hangs" the system before reaching the console login prompt. This makes perfect sense; onedrive
is now monitoring my sync folder and the system waits for it to "finish". I can kill onedrive
with Ctrl-C and get to the login prompt, but obviously I want it to keep running...Is rc.d actually meant only for programs that are already daemons? Or can I use rc.d to daemonize any non-daemon program?
I tried to use the daemon command explicitly, and created a shell script:
Code:
#!/bin/sh
daemon -u borysj onedrive --monitor
but I am not sure if it works. "Nothing" happens, and neither
Code:
# ps -ax | grep onedrive
Code:
# ps -ax | grep daemon
Is it a proper approach?