diff --git a/dev-python/carbon/files/carbon.initd2 b/dev-python/carbon/files/carbon.initd2 index e7f1f1ea2aacf..ff1509747ef11 100644 --- a/dev-python/carbon/files/carbon.initd2 +++ b/dev-python/carbon/files/carbon.initd2 @@ -5,13 +5,13 @@ export GRAPHITE_CONF_DIR=/etc/carbon export GRAPHITE_STORAGE_DIR=/var/lib/carbon -INSTANCE=${SVCNAME/#*.} -if [ "${INSTANCE}" == "${SVCNAME}" ]; then +INSTANCE=${SVCNAME#*.} +if [ "${INSTANCE}" = "${SVCNAME}" ]; then INSTANCE="a" fi PIDFILE="/var/run/${SVCNAME}.pid" -PROGRAMNAME=${SVCNAME/.*} +PROGRAMNAME=${SVCNAME%%.*} CARBON_CONFIG=${CARBON_CONFIG:-/etc/carbon/carbon.conf}