Hi,
I am trying to run a executable I created with golang named webstart located in /go/webstart/webstart
Here is a script I create based on this example
then I added
then I reboot
then I try to start with command
I get error
What I am doing wrong?
if I run it with
Thank you
I am using FreeBSD 13.1
I am trying to run a executable I created with golang named webstart located in /go/webstart/webstart
Here is a script I create based on this example
Practical rc.d scripting in BSD
A guide to writing new rc.d scripts and understanding those already written
docs.freebsd.org
Code:
#!/bin/sh
. /etc/rc.subr
name="startweb"
rcvar="startweb_enable"
command="/go/webstart/webstart"
load_rc_config $name
run_rc_command "$1"
startweb_enable="YES"
in /etc/rc.confthen I reboot
then I try to start with command
service startweb start
I get error
Code:
env: /usr/local/etc/rc.d/startweb: No such file or directory
if I run it with
./webstart
from /go/webstart/ everything is fineThank you
I am using FreeBSD 13.1