| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
GANGLIA_HOME=${CLIENT_BASEDIR} |
| 4 |
GANGLIA_ETC=${GANGLIA_HOME}/etc |
| 5 |
|
| 6 |
GMOND_CONF=${GANGLIA_ETC}/gmond.conf |
| 7 |
|
| 8 |
# Set variable smf depending on the availability of SMF binaries |
| 9 |
smf=no |
| 10 |
if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] |
| 11 |
then |
| 12 |
smf=yes |
| 13 |
fi |
| 14 |
|
| 15 |
# If needed, configure SMF |
| 16 |
if [ $smf = yes ] |
| 17 |
then |
| 18 |
# Register with SMF |
| 19 |
echo "Configuring service in SMF" |
| 20 |
/usr/sbin/svccfg import ${GANGLIA_HOME}/var/svc/manifest/ganglia/gmond.xml >/dev/null 2>&1 |
| 21 |
/usr/sbin/svcadm disable svc:/ganglia/gmond >/dev/null 2>&1 |
| 22 |
echo "gmond is using Service Management Facility. The FMRI is:" |
| 23 |
echo " svc:/ganglia/gmond:default" |
| 24 |
fi |
| 25 |
|
| 26 |
if [ $smf = yes ] |
| 27 |
then |
| 28 |
/usr/sbin/svcadm enable svc:/ganglia/gmond |
| 29 |
else |
| 30 |
/etc/init.d/gmond start |
| 31 |
fi |
| 32 |
|
| 33 |
exit 0 |
| 34 |
|