Fixed startup script
parent
720f3b3eb6
commit
cff0274c0c
|
@ -1,7 +1,14 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
PYTHON=`which python`
|
||||
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
cd $DIR
|
||||
$PYTHON -m octoprint.server $@
|
||||
$PYTHON -m octoprint.server $@
|
||||
|
|
Loading…
Reference in New Issue