initial commit of file from CVS for e-smith-base on Thu 26 Oct 11:24:52 BST 2023

This commit is contained in:
2023-10-26 11:24:52 +01:00
parent bbc22988a8
commit 9510d1a360
678 changed files with 22721 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
#! /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 status not enabled in configuration db."
exit 0
# change this one to 5 if you want systemd to fail on ExecStartPre
fi
exit 0