data-path-fix: add gcode path option

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-10-21 19:13:53 -04:00
parent 6afa664ac9
commit 4c963de0fc
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,7 @@ MOONRAKER_LOG="${LOG_PATH}/moonraker.log"
ALIAS="moonraker"
# Parse command line arguments
while getopts "c:l:d:a:m:" arg; do
while getopts "c:l:d:a:m:g:" arg; do
case $arg in
c)
MOONRAKER_CONF=$OPTARG
@ -35,6 +35,10 @@ while getopts "c:l:d:a:m:" arg; do
DB_PATH=$OPTARG
[ ! -f "${DB_PATH}/data.mdb" ] && echo "No valid database found at ${DB_PATH}" && exit 1
;;
g)
GCODE_PATH=$OPTARG
[ ! -d "${GCODE_PATH}" ] && echo "No GCode Path found at ${GCODE_PATH}" && exit 1
;;
esac
done