install: add flag to disable systemctl
The "-z" flag will run the install script without running the systemctl command. This is useful for installations which are done outside of the normal "boot" process. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
4be8e2e72f
commit
b06f782665
|
@ -6,6 +6,7 @@ PYTHONDIR="${HOME}/moonraker-env"
|
|||
SYSTEMDDIR="/etc/systemd/system"
|
||||
REBUILD_ENV="n"
|
||||
FORCE_DEFAULTS="n"
|
||||
DISABLE_SYSTEMCTL="n"
|
||||
CONFIG_PATH="${HOME}/moonraker.conf"
|
||||
LOG_PATH="/tmp/moonraker.log"
|
||||
|
||||
|
@ -89,8 +90,10 @@ Restart=always
|
|||
RestartSec=10
|
||||
EOF
|
||||
# Use systemctl to enable the klipper systemd service script
|
||||
if [ $DISABLE_SYSTEMCTL = "n" ]; then
|
||||
sudo systemctl enable moonraker.service
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
}
|
||||
|
||||
check_polkit_rules()
|
||||
|
@ -149,10 +152,11 @@ SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
|
|||
LAUNCH_CMD="${PYTHONDIR}/bin/python ${SRCDIR}/moonraker/moonraker.py"
|
||||
|
||||
# Parse command line arguments
|
||||
while getopts "rfc:l:" arg; do
|
||||
while getopts "rfzc:l:" arg; do
|
||||
case $arg in
|
||||
r) REBUILD_ENV="y";;
|
||||
f) FORCE_DEFAULTS="y";;
|
||||
z) DISABLE_SYSTEMCTL="y";;
|
||||
c) CONFIG_PATH=$OPTARG;;
|
||||
l) LOG_PATH=$OPTARG;;
|
||||
esac
|
||||
|
@ -165,4 +169,6 @@ install_packages
|
|||
create_virtualenv
|
||||
install_script
|
||||
check_polkit_rules
|
||||
if [ $DISABLE_SYSTEMCTL = "n" ]; then
|
||||
start_software
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue