I have a bash script in my
/usr/local/etc/rc.d/
that should run python script. I run the bush script with
service script_name start
and nothing happens at all. How could i debug that rc.d script? How could i know what is going on?
I have a bash script in my
/usr/local/etc/rc.d/
that should run python script. I run the bush script with
service script_name start
and nothing happens at all. How could i debug that rc.d script? How could i know what is going on?
FreeBSD rc.d system expects /bin/sh scripts. Hence sh debugging techniques apply here. For example printing the statements with set -x and set -v.
# cat script.sh
Below is a simple example how to start my_app with the service command
# cat /scratch/my_app
# cat /usr/local/etc/rc.d/my_app
# grep my_app /etc/rc.conf
# service my_app start
Details are available in Practical rc.d scripting in BSD and The Design and Implementation of the NetBSD rc.d system.
Also quoting from the doc