Script won't start....not sure how to debug

Status
Not open for further replies.

project_x

Cadet
Joined
Jan 9, 2016
Messages
9
I have been having difficulty getting my amazon bridge to run inside a jail...after plugging away at it, i have finally got it working.

I now want it to start on jail startup.

I created a script echo_bridge in /etc/rc.d
Code:
#!/bin/sh

#PROVIDE echo_bridge

. /etc/rc.subr
name="echo_bridge"
rcvar=echo_bridge_enable
start_cmd="${name}_start"
stop_cmd=":"

echo_bridge_start(){

. /media/echo/echo.sh
}
load_rc_config $name
run_rc_command "$1"



I set the echo_bridge_enable="YES" in rc.conf
I tested /etc/rc.d/echo_bridge rcvar and it returned
Code:
# echo_bridge
#
echo_bridge_enable="YES"
#   (default: "")


It is listed in rcorder

but upon restart, it doesn't work. if I type tail /var/log/messages i get
Code:
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: rc_startmsgs is set to YES.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: run_rc_command: doit: /usr/sbin/cron  -s
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: run_rc_command: doit: pkg_start
Feb  7 08:57:46 Automation root: /etc/rc.d/sysctl: DEBUG: run_rc_command: doit: sysctl_start last
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: kern_securelevel_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: inetd_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: ftpd_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: ftpproxy_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: echo_bridge_enable is set to YES.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: run_rc_command: doit: echo_bridge_start

but it isn't running

It runs manually when i type /etc/rc.d/echo_bridge start
when i type tail /var/log/messages after manually starting it, I get
Code:
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: kern_securelevel_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: inetd_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: ftpd_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: ftpproxy_enable is set to NO.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: checkyesno: echo_bridge_enable is set to YES.
Feb  7 08:57:46 Automation root: /etc/rc: DEBUG: run_rc_command: doit: echo_bridge_start
Feb  7 09:07:15 Automation root: /etc/rc.d/echo_bridge: DEBUG: checkyesno: echo_bridge_enable is set to YES.
Feb  7 09:07:15 Automation root: /etc/rc.d/echo_bridge: DEBUG: run_rc_command: doit: echo_bridge_start
Feb  7 09:10:13 Automation root: /etc/rc.d/echo_bridge: DEBUG: checkyesno: echo_bridge_enable is set to YES.
Feb  7 09:10:13 Automation root: /etc/rc.d/echo_bridge: DEBUG: run_rc_command: doit: echo_bridge_start

Notice the last four lines, which do not appear on restart


Any thoughts?
 
Last edited:

project_x

Cadet
Joined
Jan 9, 2016
Messages
9
echo.sh contents (which also runs when called manually)
Code:
java -jar -Djava.net.preferIPv4Stack=true -Dvera.address=192.168.1.88 -Dupnp.config.address=192.168.1.50 -Dupnp.response.port=50099 /media/echo/echo.jar
 
D

dlavigne

Guest
Does moving it to /usr/local/etc/rc.d within the jail make a difference?

If not, it might be easier to create a crontab within the jail that runs echo.sh at reboot...
 

project_x

Cadet
Joined
Jan 9, 2016
Messages
9
moving it made no difference
 
Status
Not open for further replies.
Top