/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz10957-service-status.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz10957-service-status.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sun Jun 6 20:38:23 2021 UTC (3 years, 4 months ago) by jpp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
5.8.1

1 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
2 --- e-smith-base-5.8.0.old/root/sbin/e-smith/service-status 1969-12-31 19:00:00.000000000 -0500
3 +++ e-smith-base-5.8.0/root/sbin/e-smith/service-status 2020-11-08 23:29:19.672000000 -0500
4 @@ -0,0 +1,29 @@
5 +#! /bin/sh
6 +
7 +SERVICE=$1
8 +USAGE="Usage: service-status SERVICENAME"
9 +
10 +#if no servicename is provided return usage
11 +if [[ "${SERVICE}" == "" ]]
12 +then
13 + echo ${USAGE} >&2
14 + exit 1
15 +fi
16 +
17 +TYPE=$(/sbin/e-smith/db configuration gettype "$SERVICE" || echo none)
18 +
19 +if [[ "$TYPE" != 'service' ]]
20 +then
21 + echo "$SERVICE is not a service"
22 + exit 9
23 +fi
24 +
25 +STATUS=$(/sbin/e-smith/db configuration getprop "$SERVICE" status || echo disabled)
26 +
27 +if [[ "$STATUS" != 'enabled' ]]
28 +then
29 + echo "$SERVICE will not start (service status not enabled)"
30 + exit 5
31 +fi
32 +
33 +exit 0

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed