I have a simple script:
#!/bin/sh
PROVIDE: test
REQUIRE: LOGIN NETWORKING
. /etc/rc.subr
name="test"
load_rc_config $name
rcvar=test_enable
cd /home/deploy/projects/test
/usr/sbin/daemon -u deploy /usr/local/bin/node /home/deploy/projects/test/server.js
run_rc_command "$1"
inside /usr/local/etc/rc.d. It is executable. It is registred into /etc/rc.conf
I need it to start after boot/reboot. I managed to do it with Cron using
@reboot
but it doesn't look legit. What is the proper way to run that script automatically after boot/reboot?