Skip to content

Commit

Permalink
chore: update moonraker module
Browse files Browse the repository at this point in the history
Update of moonraker module according to

Arksine/moonraker#516

Signed-off-by: Stephan Wendel <[email protected]>
  • Loading branch information
KwadFan committed Oct 22, 2022
1 parent fc95133 commit 4ea1a35
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/modules/moonraker/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env bash
#Shebang for better file detection
[ -n "$MOONRAKER_REPO_SHIP" ] || MOONRAKER_REPO_SHIP=https://github.com/Arksine/moonraker.git
[ -n "$MOONRAKER_REPO_BRANCH" ] || MOONRAKER_REPO_BRANCH=master
21 changes: 11 additions & 10 deletions src/modules/moonraker/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,34 @@
# GPL V3
########

# shellcheck enable=require-variable-braces

# Source error handling, leave this in place
set -xe

# Source CustomPIOS common.sh
# shellcheck disable=SC1091
source /common.sh
install_cleanup_trap

# make sure that this module can be used standalone
apt_update_skip
check_install_pkgs "git virtualenv wireless-tools"
check_install_pkgs "git"

echo_green "Installing Moonraker and enable Moonraker Service"
# install MainsailOS premade moonraker.conf
echo_green "Copying MainsailOS premade moonraker.conf"
unpack /filesystem/home/${BASE_USER} /home/${BASE_USER} ${BASE_USER}
# clone klipper repo
pushd /home/${BASE_USER}
pushd /home/"${BASE_USER}"
gitclone MOONRAKER_REPO moonraker
# use moonrakers Install script
echo_green "Launch moonraker Install script (scripts/install-moonraker.sh)"
sudo -u ${BASE_USER} \
sudo -u "${BASE_USER}" \
bash -c \
'${HOME}/moonraker/scripts/install-moonraker.sh \
-c ${HOME}/klipper_config/moonraker.conf \
-l ${HOME}/klipper_logs/moonraker.log'
'${HOME}/moonraker/scripts/install-moonraker.sh -z -x'
# install Polkit Rules
echo_green "Install PolicyKit Rules"
sudo -u ${BASE_USER} sh -c './moonraker/scripts/set-policykit-rules.sh --root'
sudo -u "${BASE_USER}" sh -c './moonraker/scripts/set-policykit-rules.sh --root'
# finished
popd
# install MainsailOS premade moonraker.conf
echo_green "Copying MainsailOS premade moonraker.conf"
unpack /filesystem/home/"${BASE_USER}" /home/"${BASE_USER}" "${BASE_USER}"

0 comments on commit 4ea1a35

Please sign in to comment.