HiveOS support
This commit is contained in:
parent
2a62844fe8
commit
370cf7487b
5 changed files with 147 additions and 0 deletions
31
hiveos/parse-api-port.sh
Executable file
31
hiveos/parse-api-port.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$MINER_DIR" ]
|
||||
then
|
||||
. ./h-manifest.conf
|
||||
args=$(getopt -q -u -l "api-port:" -o "l:" -- `cat ./$CUSTOM_NAME.conf`)
|
||||
else
|
||||
. $MINER_DIR/$CUSTOM_MINER/h-manifest.conf
|
||||
args=$(getopt -q -u -l "api-port:" -o "l:" -- `cat $MINER_DIR/$CUSTOM_MINER/$CUSTOM_NAME.conf`)
|
||||
fi
|
||||
|
||||
eval set -- "$args"
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
case "$1" in
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
--api-port)
|
||||
CUSTOM_API_PORT="$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "$MINER_DIR" ]
|
||||
then
|
||||
echo $CUSTOM_API_PORT
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue