|
7 | 7 | # GPL V3
|
8 | 8 | ########
|
9 | 9 |
|
| 10 | +# shellcheck enable=require-variable-braces |
| 11 | + |
10 | 12 | # Source error handling, leave this in place
|
11 | 13 | set -xe
|
12 | 14 |
|
13 | 15 | # Source CustomPIOS common.sh
|
| 16 | +# shellcheck disable=SC1091 |
14 | 17 | source /common.sh
|
15 | 18 | install_cleanup_trap
|
16 | 19 |
|
17 | 20 | # make sure that this module can be used standalone
|
18 | 21 | apt_update_skip
|
19 |
| -check_install_pkgs "git virtualenv wireless-tools" |
| 22 | +check_install_pkgs "git" |
20 | 23 |
|
21 | 24 | echo_green "Installing Moonraker and enable Moonraker Service"
|
22 |
| -# install MainsailOS premade moonraker.conf |
23 |
| -echo_green "Copying MainsailOS premade moonraker.conf" |
24 |
| -unpack /filesystem/home/${BASE_USER} /home/${BASE_USER} ${BASE_USER} |
25 | 25 | # clone klipper repo
|
26 |
| -pushd /home/${BASE_USER} |
| 26 | +pushd /home/"${BASE_USER}" |
27 | 27 | gitclone MOONRAKER_REPO moonraker
|
28 | 28 | # use moonrakers Install script
|
29 | 29 | echo_green "Launch moonraker Install script (scripts/install-moonraker.sh)"
|
30 |
| -sudo -u ${BASE_USER} \ |
| 30 | +sudo -u "${BASE_USER}" \ |
31 | 31 | bash -c \
|
32 |
| -'${HOME}/moonraker/scripts/install-moonraker.sh \ |
33 |
| --c ${HOME}/klipper_config/moonraker.conf \ |
34 |
| --l ${HOME}/klipper_logs/moonraker.log' |
| 32 | +'${HOME}/moonraker/scripts/install-moonraker.sh -z -x' |
35 | 33 | # install Polkit Rules
|
36 | 34 | echo_green "Install PolicyKit Rules"
|
37 |
| -sudo -u ${BASE_USER} sh -c './moonraker/scripts/set-policykit-rules.sh --root' |
| 35 | +sudo -u "${BASE_USER}" sh -c './moonraker/scripts/set-policykit-rules.sh --root' |
38 | 36 | # finished
|
39 | 37 | popd
|
| 38 | +# install MainsailOS premade moonraker.conf |
| 39 | +echo_green "Copying MainsailOS premade moonraker.conf" |
| 40 | +unpack /filesystem/home/"${BASE_USER}" /home/"${BASE_USER}" "${BASE_USER}" |
0 commit comments