#!/bin/sh /etc/rc.common
# Copyright 2020 Rafał Wabik (IceG) - From eko.one.pl forum
# Licensed to the GNU General Public License v3.0.

USE_PROCD=1
START=99
STOP=01

start_service() {
    procd_open_instance
    procd_set_param command /bin/sh "/sbin/smsled-init.sh"
    procd_close_instance
}

stop_service() {
	for KILLPID in `ps | grep 'smsled' | awk ' { print $1;}'`; do 
  	(kill -9 $KILLPID >/dev/null 2>&1 )&
	done
	sleep 1
	return 0
}

restart_service() {
    stop_service
    start_service
}
