Commit d30fda17 authored by Michael Ott's avatar Michael Ott
Browse files

Remove syspusher init script

parent 5bbec3b0
......@@ -9,8 +9,6 @@ install:
mkdir -p $(DCDBDEPLOYPATH)/etc/init.d/
sed -e 's|%DCDB_PREFIX%|'$(DCDBDEPLOYPATH)'|g' dcdb_init > $(DCDBDEPLOYPATH)/etc/init.d/dcdb
chmod +x $(DCDBDEPLOYPATH)/etc/init.d/dcdb
sed -e 's|%DCDB_PREFIX%|'$(DCDBDEPLOYPATH)'|g' sysfspusher_init > $(DCDBDEPLOYPATH)/etc/init.d/sysfspusher
chmod +x $(DCDBDEPLOYPATH)/etc/init.d/sysfspusher
# Install dcdbplot
install -m 755 dcdbplot $(DCDBDEPLOYPATH)/bin/dcdbplot
......
#!/bin/sh
### BEGIN INIT INFO
# Provides: sysfspusher
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: SysFsPusher for BIC
### END INIT INFO
DCDB_PREFIX=%DCDB_PREFIX%
export LD_LIBRARY_PATH=${DCDB_PREFIX}/lib/
case $1 in
start)
echo "Starting SysFsPusher"
DEVICEID=`ifconfig eth0|awk -F':' '/HWaddr/ { print $4$5$6$7 }'`
BIC=$((10#`hostname -s| sed 's/\(deep-\)*bic\([0-9]*\)/\2/'`-1))
CHASSISID=$(($BIC/2))
BICID=$(($BIC%2))
printf -v TOPIC "/00/00/0000/%02X/%02X/FF/FF/%08s/0000" $CHASSISID $BICID $DEVICEID
${DCDB_PREFIX}/bin/sysfspusher -d -t "$TOPIC" ${DCDB_PREFIX}/etc/sysfspusher.conf
;;
stop)
echo "Stopping SysFsPusher"
killall sysfspusher
;;
restart|force-reload)
$0 stop && sleep 5 && $0 start
;;
reload)
exit 3
;;
status)
echo "Status not implemented."
exit 3
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 2
;;
esac
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment