Fixed startup script
This commit is contained in:
parent
720f3b3eb6
commit
cff0274c0c
1 changed files with 10 additions and 3 deletions
13
run
Normal file → Executable file
13
run
Normal file → Executable file
|
|
@ -1,7 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
PYTHON=`which python`
|
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
|
cd $DIR
|
||||||
$PYTHON -m octoprint.server $@
|
$PYTHON -m octoprint.server $@
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue