diff --git a/readme.md b/readme.md index 66deb927..fcbebe8e 100644 --- a/readme.md +++ b/readme.md @@ -55,12 +55,10 @@ In addition, there is the possibility to use and set up a second device as a das - Display different modes of data for a by team comparison - _Optional_: Use the dashboard as WiFi hot-spot - # Quickstart Here are some simple steps to get CocktailBerry running. You need to have **Python 3.9** or newer and **git** installed. - On the RPi, you can try the new [all in one installer script](https://github.com/AndreWohnsland/CocktailBerry/blob/master/scripts/all_in_one.sh). One command should install everything: ```bash @@ -84,7 +82,6 @@ This will start the CocktailBerry program. You may want to run the provided inst sh scripts/setup.sh ``` - Now you can [Set Up](https://cocktailberry.readthedocs.io/setup/#setting-up-the-machine-modifying-other-values) your CocktailBerry and tweak the settings to your liking. # Interface diff --git a/scripts/setup.sh b/scripts/setup.sh index 2aba9a75..2bda45a7 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -4,14 +4,6 @@ # Options: # dashboard: set up dashboard, otherwise will set up CocktailBerry -is_raspberry_pi() { - if grep -q "Raspberry Pi" /proc/device-tree/model 2>/dev/null; then - return 0 - else - return 1 - fi -} - echo "Installing updates, this may take a while..." sudo apt update && sudo sudo apt -y full-upgrade diff --git a/scripts/setup_non_rpi.sh b/scripts/setup_non_rpi.sh index 20f82018..b5a3a23e 100755 --- a/scripts/setup_non_rpi.sh +++ b/scripts/setup_non_rpi.sh @@ -1,5 +1,13 @@ #!/bin/bash +is_raspberry_pi() { + if grep -q "Raspberry Pi" /proc/device-tree/model 2>/dev/null; then + return 0 + else + return 1 + fi +} + # Check if the script is running on a non-Raspberry Pi device if ! is_raspberry_pi; then echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee "/etc/sudoers.d/99_$(whoami)_nopasswd" >/dev/null @@ -12,8 +20,8 @@ if ! is_raspberry_pi; then sudo usermod -aG gpio "$USER" # Create the setup_gpio_permissions.sh script - sudo cp .scripts/setup_gpio_permissions.sh /usr/local/bin/setup_gpio_permissions.sh - sudo cp .scripts/setup_gpio_permissions.service /etc/systemd/system/setup_gpio_permissions.service + sudo cp ./scripts/setup_gpio_permissions.sh /usr/local/bin/setup_gpio_permissions.sh + sudo cp ./scripts/setup_gpio_permissions.service /etc/systemd/system/setup_gpio_permissions.service # Make the script executable sudo chmod +x /usr/local/bin/setup_gpio_permissions.sh @@ -26,7 +34,7 @@ if ! is_raspberry_pi; then # set the rules to enable gpio # only both in combination seem to work sudo apt install python3-pip libgpiod2 - sudo cp .scripts/99-gpio.rules /etc/udev/rules.d/99-gpio.rules + sudo cp ./scripts/99-gpio.rules /etc/udev/rules.d/99-gpio.rules sudo udevadm control --reload-rules sudo udevadm trigger