diff -Nur e-smith-base-5.8.0.old/root/sbin/e-smith/service-status e-smith-base-5.8.0/root/sbin/e-smith/service-status --- e-smith-base-5.8.0.old/root/sbin/e-smith/service-status 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-base-5.8.0/root/sbin/e-smith/service-status 2020-11-08 23:29:19.672000000 -0500 @@ -0,0 +1,29 @@ +#! /bin/sh + +SERVICE=$1 +USAGE="Usage: service-status SERVICENAME" + +#if no servicename is provided return usage +if [[ "${SERVICE}" == "" ]] +then + echo ${USAGE} >&2 + exit 1 +fi + +TYPE=$(/sbin/e-smith/db configuration gettype "$SERVICE" || echo none) + +if [[ "$TYPE" != 'service' ]] +then + echo "$SERVICE is not a service" + exit 9 +fi + +STATUS=$(/sbin/e-smith/db configuration getprop "$SERVICE" status || echo disabled) + +if [[ "$STATUS" != 'enabled' ]] +then + echo "$SERVICE will not start (service status not enabled)" + exit 5 +fi + +exit 0