ADD scripts
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
RUNDIR=/tmp/btcspy
|
||||||
|
|
||||||
|
if [ -d /opt/TOPISTO/data/btcspy ];
|
||||||
|
then
|
||||||
|
RUNDIR=/opt/TOPISTO/data/btcspy
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $RUNDIR/data/simpledb ];
|
||||||
|
then
|
||||||
|
mkdir -p $RUNDIR/data/simpledb/blocks
|
||||||
|
fi
|
||||||
|
if [ ! -d $RUNDIR/tmp ];
|
||||||
|
then
|
||||||
|
mkdir -p $RUNDIR/tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
/tmp/btcspy/bin/btcspy $RUNDIR
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sleep 60
|
||||||
|
|
||||||
|
if [ ! -f $RUNDIR/tmp/daemond.lock ];
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ -d /opt/TOPISTO/data/btcspy ];
|
||||||
|
then
|
||||||
|
find /opt/TOPISTO/data/btcspy/data/simpledb/blocks -type f -mtime +3 -exec rm {} \;
|
||||||
|
find /opt/TOPISTO/data/btcspy/data/json -type f -mtime +3 -exec rm {} \;
|
||||||
|
|
||||||
|
|
||||||
|
for BLOCK in `ls -ltr /opt/TOPISTO/data/btcspy/data/simpledb/blocks`
|
||||||
|
do
|
||||||
|
if [ ! -f /opt/TOPISTO/data/btcspy/data/json/$BLOCK.json ];
|
||||||
|
then
|
||||||
|
/tmp/btcspy/bin/block2json $BLOCK > /opt/TOPISTO/data/btcspy/data/json/$BLOCK.json
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user