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

USE_PROCD=1
START=70

SAMPLICATOR_BIN="/usr/sbin/samplicate"
SAMPLICATOR_CONF="/etc/samplicator.conf"

start_service() {
    mkdir -p /var/run
    procd_open_instance
    procd_set_param command $SAMPLICATOR_BIN -c $SAMPLICATOR_CONF
    procd_set_param file "$SAMPLICATOR_CONF"
    procd_set_param stdout 1
    procd_set_param stderr 1
    procd_set_param respawn
    procd_close_instance
}