#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2013 OpenWrt.org
# Copyright (C) 2008 Jo-Philipp Wich
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.

START=80
STOP=10

USE_PROCD=1
PROG=/usr/bin/zeronews

start_service(){
        echo "Start ZeroNews Client Program"

        procd_open_instance zeronews
        procd_set_param command "$PROG" start
        procd_set_param respawn
        procd_append_param respawn 3600
        procd_append_param respawn 5
        procd_append_param respawn -1
        procd_close_instance
}

stop_service(){
        killall $PROG
}

restart_service(){
        stop_service
        start_service
}