Hello
I've tried for 2 days now and I do not get the information regarding rc.d
I've tried to write this startup script at least 10 times and it always fails.
What I'm trying to do is to start 2 programs when the computer starts but I can't even get it to work with one of them.
I usually start it like this:
"cd /usr/local/program"
"./program-name"
"./program2-name"
This was my last try:
It is saved in "/usr/local/etc/rc.d/" (hope I typed the folder correct, it's the right one)
How would I write a rc.d script to start these 2 programs after boot? And can it be started by the user "Geffan"?
Thanks in advance
I've tried for 2 days now and I do not get the information regarding rc.d
I've tried to write this startup script at least 10 times and it always fails.
What I'm trying to do is to start 2 programs when the computer starts but I can't even get it to work with one of them.
I usually start it like this:
"cd /usr/local/program"
"./program-name"
"./program2-name"
This was my last try:
Code:
#!/bin/sh
. /etc/rc.subr
name="program-name"
rcvar=`set_rcvar`
load_rc_config $name
start_cmd="${name}_start"
: ${program-name_enable}="YES"
program-name_start () {
cd /usr/local/program ; ./program-name
}
run_rc_command "$1"
How would I write a rc.d script to start these 2 programs after boot? And can it be started by the user "Geffan"?
Thanks in advance