From 7ed54a166b7e58cc543892dd8a4171c2db9f1a83 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 29 May 2021 15:55:19 -0400 Subject: [PATCH] scripts: provide a log path option in install-moonraker.sh Signed-off-by: Eric Callahan --- scripts/install-moonraker.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install-moonraker.sh b/scripts/install-moonraker.sh index 7527df4..fabf695 100755 --- a/scripts/install-moonraker.sh +++ b/scripts/install-moonraker.sh @@ -7,6 +7,7 @@ SYSTEMDDIR="/etc/systemd/system" REBUILD_ENV="n" FORCE_DEFAULTS="n" CONFIG_PATH="${HOME}/moonraker.conf" +LOG_PATH="/tmp/moonraker.log" # Step 1: Verify Klipper has been installed check_klipper() @@ -87,7 +88,7 @@ WantedBy=multi-user.target Type=simple User=$USER 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 RestartSec=10 EOF @@ -126,11 +127,12 @@ set -e SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )" # Parse command line arguments -while getopts "rfc:" arg; do +while getopts "rfc:l:" arg; do case $arg in r) REBUILD_ENV="y";; f) FORCE_DEFAULTS="y";; c) CONFIG_PATH=$OPTARG;; + l) LOG_PATH=$OPTARG;; esac done