I have a jail with a custom rc.d script that I had made to run a server on boot.
The script at
Inside my
Am I missing something? If I run
The script at
/usr/local/etc/rc.d/minecraft
looks like this:
Code:
#!/bin/sh
. /etc/rc.subr
name=minecraft
rcvar=minecraft_enable
required_files="/opt/servers/minecraft/start.sh"
start_cmd=${name}_start
stop_cmd=${name}_stop
minecraft_start()
{
echo "Starting ${name}."
/opt/servers/minecraft/start.sh
echo "Done."
}
minecraft_stop()
{
#My Stop Command
}
load_rc_config $name
run_rc_command "$@"
Inside my
/etc/rc.conf
I have minecraft_enable="YES"
. However after a restart of the jail, the service never started. If I do service -e
the output is:
Code:
/etc/rc.d/cleanvar
/etc/rc.d/netif
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/etc/rc.d/virecover
/etc/rc.d/cleartmp
/etc/rc.d/motd
/etc/rc.d/cron
Am I missing something? If I run
service start minecraft
everything runs just fine.