scripts: provide a log path option in install-moonraker.sh
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
2ab63d75fc
commit
7ed54a166b
|
@ -7,6 +7,7 @@ SYSTEMDDIR="/etc/systemd/system"
|
||||||
REBUILD_ENV="n"
|
REBUILD_ENV="n"
|
||||||
FORCE_DEFAULTS="n"
|
FORCE_DEFAULTS="n"
|
||||||
CONFIG_PATH="${HOME}/moonraker.conf"
|
CONFIG_PATH="${HOME}/moonraker.conf"
|
||||||
|
LOG_PATH="/tmp/moonraker.log"
|
||||||
|
|
||||||
# Step 1: Verify Klipper has been installed
|
# Step 1: Verify Klipper has been installed
|
||||||
check_klipper()
|
check_klipper()
|
||||||
|
@ -87,7 +88,7 @@ WantedBy=multi-user.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=$USER
|
User=$USER
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=${PYTHONDIR}/bin/python ${SRCDIR}/moonraker/moonraker.py -c ${CONFIG_PATH}
|
ExecStart=${PYTHONDIR}/bin/python ${SRCDIR}/moonraker/moonraker.py -c ${CONFIG_PATH} -l ${LOG_PATH}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
EOF
|
EOF
|
||||||
|
@ -126,11 +127,12 @@ set -e
|
||||||
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
|
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
while getopts "rfc:" arg; do
|
while getopts "rfc:l:" arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
r) REBUILD_ENV="y";;
|
r) REBUILD_ENV="y";;
|
||||||
f) FORCE_DEFAULTS="y";;
|
f) FORCE_DEFAULTS="y";;
|
||||||
c) CONFIG_PATH=$OPTARG;;
|
c) CONFIG_PATH=$OPTARG;;
|
||||||
|
l) LOG_PATH=$OPTARG;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue