summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/nxnode/files/nxnode-3.0.0-init')
-rw-r--r--net-misc/nxnode/files/nxnode-3.0.0-init68
1 files changed, 0 insertions, 68 deletions
diff --git a/net-misc/nxnode/files/nxnode-3.0.0-init b/net-misc/nxnode/files/nxnode-3.0.0-init
deleted file mode 100644
index 8b897db..0000000
--- a/net-misc/nxnode/files/nxnode-3.0.0-init
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-NX_NODE_CFG="/usr/NX/etc/node.cfg"
-NX_SENSOR_CMD="/usr/NX/bin/nxsensor"
-NX_SENSOR_PID="/usr/NX/var/run/nxsensor.pid"
-NX_SENSOR_HOST="127.0.0.1"
-NX_SENSOR_PORT="19250"
-
-depend()
-{
- need net
-}
-
-is_enabled()
-{
- local tmp
-
- if ! [[ -x $NX_SENSOR_CMD ]] ; then
- eerror "$NX_SENSOR_CMD not found"
- return 1
- fi
-
- tmp=`/usr/bin/awk -F'"' '/^EnableSensor/ {print $2}' $NX_NODE_CFG`
- if [[ $tmp != "1" ]]; then
- eerror "nxsensor is disabled in $NX_NODE_CFG"
- return 1
- fi
-
- tmp=`/usr/bin/awk -F'"' '/^StatisticsHost/ {print $2}' $NX_NODE_CFG`
- if [[ -n $tmp ]] ; then
- NX_SENSOR_HOST="$tmp"
- fi
-
- tmp=`/usr/bin/awk -F'"' '/^NodeSensorPort/ {print $2}' $NX_NODE_CFG`
- if [[ -n $tmp ]] ; then
- NX_SENSOR_PORT="$tmp"
- fi
-
- return 0
-}
-
-start() {
- is_enabled || return 1
- ebegin "Starting nxsensor"
- $NX_SENSOR_CMD -a $NX_SENSOR_HOST -a "::ffff:$NX_SENSOR_HOST" -P $NX_SENSOR_PORT -d
- PID=`ps -ef | grep $NX_SENSOR_CMD | grep -v grep | awk '{print $2}'`
- if [[ -z $PID ]] ; then
- eend 1
- else
- echo $PID > $NX_SENSOR_PID
- eend 0
- fi
-}
-
-stop() {
- ebegin "Stopping nxsensor"
- PID=`cat $NX_SENSOR_PID`
- if [[ -z $PID ]] ; then
- eerror "nxsensor not started"
- eend 1
- else
- kill $PID
- rm -f $NX_SENSOR_PID
- eend 0
- fi
-}