rc.d

How to debug rc.d scripts in FreeBSD?

狂风中的少年 提交于 2019-12-02 10:39:58
问题 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? 回答1: 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 #!/bin/sh set -x set -v ... Below is a simple example how to start my_app with the service