#!/bin/sh /etc/rc.common
# /etc/init.d/my-plugin

START=98

start(){
    /bin/sh /root/mqtt_cmd.sh &> /dev/null &
    echo $! > /tmp/mqtt_cmd.pid
}

stop(){    
    # Kill the process started by /root/cmd.sh
    if [ -f /tmp/mqtt_cmd.pid ]; then
        kill $(cat /tmp/mqtt_cmd.pid) 2>/dev/null
        rm -f /tmp/mqtt_cmd.pid
    fi
}
