| #!/bin/sh /etc/rc.common |
| |
| START=42 |
| |
| USE_PROCD=1 |
| |
| PATH_BIN=/bin/ |
| PATH_UBIN=/usr/bin/ |
| PATH_CURR= |
| |
| start_instance() { |
| local respawn="$1" |
| local name="$2" |
| local path="$3$2" |
| local param="$4" |
| |
| procd_open_instance "$name" |
| |
| if [ -n "$param" ]; then |
| procd_set_param command "$path" "$param" |
| else |
| procd_set_param command "$path" |
| fi |
| |
| if [ $respawn == 1 ]; then |
| procd_set_param respawn 3600 5 0 |
| fi |
| procd_close_instance |
| } |
| |
| start_service() { |
| echo "Start Ims" |
| |
| IMS=`uci get cmdline.IMSD 2> /dev/null` |
| |
| |
| if [ "$IMS" == "1" ]; then |
| start_instance 1 "imsd" "${PATH_UBIN}" |
| fi |
| } |