iopsys-feed/bulkdata/files/etc/init.d/bulkdatad
2020-09-14 18:28:00 +02:00

34 lines
573 B
Bash
Executable file

#!/bin/sh /etc/rc.common
# Bulkdata Software
# Copyright (C) 2020 iopsys Software Solutions AB
# Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
START=99
STOP=10
USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
start_service() {
local bulkdata_enable=`uci -q get bulkdata.bulkdata.enable`
if [ "$bulkdata_enable" = "1" ]; then
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
fi
}
boot() {
start
}
reload_service() {
stop
start
}
service_triggers()
{
procd_add_reload_trigger bulkdata
}