#!/bin/sh /etc/rc.common

USE_PROCD=1
START=299
EXTRA_COMMANDS="status"
EXTRA_HELP="        status Print the status of the service"

start_service() {
    procd_open_instance
    procd_set_param command /usr/bin/opluschk.sh
    procd_set_param respawn
    procd_close_instance
}

stop_service() {
    killall opluschk.sh
}

status() {
    echo "Service status:"
    pgrep -f opluschk.sh > /dev/null && echo "Running" || echo "Stopped"
}

restart() {
    stop
    sleep 1
    start
}