mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-10 17:30:47 +00:00
Add RASCSI host and port arguments to web/start.sh (#771)
* Fix data type of --rascsi-port argument * Add support for --rascsi-host and --rascsi-port arguments * Add short parameter names, increase specificity of web port parameter
This commit is contained in:
parent
94c98b4577
commit
dc1414ba71
@ -1272,7 +1272,7 @@ function runChoice() {
|
|||||||
preparePythonCommon
|
preparePythonCommon
|
||||||
installRaScsiWebInterface
|
installRaScsiWebInterface
|
||||||
echo "Configuring RaSCSI Web Interface stand-alone - Complete!"
|
echo "Configuring RaSCSI Web Interface stand-alone - Complete!"
|
||||||
echo "Launch the Web Interface with the 'start.sh' script. To use a custom port for the web server: 'start.sh --port=8081"
|
echo "Launch the Web Interface with the 'start.sh' script. To use a custom port for the web server: 'start.sh --web-port=8081"
|
||||||
;;
|
;;
|
||||||
12)
|
12)
|
||||||
echo "Enabling authentication for the RaSCSI Web Interface"
|
echo "Enabling authentication for the RaSCSI Web Interface"
|
||||||
|
@ -1031,7 +1031,7 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--rascsi-port",
|
"--rascsi-port",
|
||||||
type=str,
|
type=int,
|
||||||
default=6868,
|
default=6868,
|
||||||
action="store",
|
action="store",
|
||||||
help="RaSCSI port. Default: 6868",
|
help="RaSCSI port. Default: 6868",
|
||||||
|
@ -90,16 +90,22 @@ while [ "$1" != "" ]; do
|
|||||||
PARAM=$(echo "$1" | awk -F= '{print $1}')
|
PARAM=$(echo "$1" | awk -F= '{print $1}')
|
||||||
VALUE=$(echo "$1" | awk -F= '{print $2}')
|
VALUE=$(echo "$1" | awk -F= '{print $2}')
|
||||||
case $PARAM in
|
case $PARAM in
|
||||||
-p | --port)
|
-p | --web-port)
|
||||||
PORT="--port $VALUE"
|
ARG_PORT="--port $VALUE"
|
||||||
;;
|
;;
|
||||||
-P | --password)
|
-P | --password)
|
||||||
PASSWORD="--password $VALUE"
|
ARG_PASSWORD="--password $VALUE"
|
||||||
;;
|
;;
|
||||||
*)
|
-h | --rascsi-host)
|
||||||
echo "ERROR: unknown parameter \"$PARAM\""
|
ARG_RASCSI_HOST="--rascsi-host $VALUE"
|
||||||
exit 1
|
;;
|
||||||
;;
|
-o | --rascsi-port)
|
||||||
|
ARG_RASCSI_PORT="--rascsi-port $VALUE"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: unknown parameter \"$PARAM\""
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
@ -108,4 +114,4 @@ PYTHON_COMMON_PATH=$(dirname $PWD)/common/src
|
|||||||
echo "Starting web server for RaSCSI Web Interface..."
|
echo "Starting web server for RaSCSI Web Interface..."
|
||||||
export PYTHONPATH=$PWD/src:${PYTHON_COMMON_PATH}
|
export PYTHONPATH=$PWD/src:${PYTHON_COMMON_PATH}
|
||||||
cd src
|
cd src
|
||||||
python3 web.py ${PORT} ${PASSWORD}
|
python3 web.py ${ARG_PORT} ${ARG_PASSWORD} ${ARG_RASCSI_HOST} ${ARG_RASCSI_PORT}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user