Skip to content

Commit

Permalink
chore: update crowsnest module (#221)
Browse files Browse the repository at this point in the history
* chore: update crowsnest module

According to changes in installer, update crowsnest module for
camera-streamer version.


Signed-off-by: Stephan Wendel <me@stephanwe.de>

---------

Signed-off-by: Stephan Wendel <me@stephanwe.de>
  • Loading branch information
KwadFan committed May 23, 2023
1 parent b07d7a1 commit 726239c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/raspberry/default
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Declare Variables before exporting.
# See https://www.shellcheck.net/wiki/SC2155

BASE_IMAGE_ENLARGEROOT=3000
BASE_IMAGE_ENLARGEROOT=4500
BASE_IMAGE_RESIZEROOT=600
# Compress not needed due compression done in workflow
BASE_RELEASE_COMPRESS=no
Expand Down
7 changes: 5 additions & 2 deletions src/modules/crowsnest/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#### crowsnest - A webcam Service for multiple Cams and Stream Services.
####
#### Written by Stephan Wendel aka KwadFan <me@stephanwe.de>
#### Copyright 2021 - 2022
#### Copyright 2021 - till today
#### https://github.com/mainsail-crew/crowsnest
####
#### This File is distributed under GPLv3
Expand All @@ -18,7 +18,6 @@
[[ -n "$CROWSNEST_CONFIG_PATH" ]] || CROWSNEST_CONFIG_PATH="/home/${BASE_USER}/printer_data/config"
[[ -n "$CROWSNEST_LOG_PATH" ]] || CROWSNEST_LOG_PATH="/home/${BASE_USER}/printer_data/logs"
[[ -n "$CROWSNEST_ENV_PATH" ]] || CROWSNEST_ENV_PATH="/home/${BASE_USER}/printer_data/systemd"
[[ -n "$CROWSNEST_RASPICAMFIX" ]] || CROWSNEST_RASPICAMFIX="1"
[[ -n "$CROWSNEST_ADD_CROWSNEST_MOONRAKER" ]] || CROWSNEST_ADD_CROWSNEST_MOONRAKER="1"
[[ -n "$CROWSNEST_MOONRAKER_CONF_PATH" ]] || CROWSNEST_MOONRAKER_CONF_PATH="/home/${BASE_USER}/printer_data/config/moonraker.conf"

Expand All @@ -27,6 +26,10 @@
[[ -n "$CROWSNEST_USTREAMER_REPO_SHIP" ]] || CROWSNEST_USTREAMER_REPO_SHIP="https://github.com/pikvm/ustreamer.git"
[[ -n "$CROWSNEST_USTREAMER_REPO_BRANCH" ]] || CROWSNEST_USTREAMER_REPO_BRANCH="master"

# camera-streamer
[[ -n "$CROWSNEST_CAMERA_STREAMER_REPO_SHIP" ]] || CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/ayufan/camera-streamer.git"
[[ -n "$CROWSNEST_CAMERA_STREAMER_REPO_BRANCH" ]] || CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="master"

###########################################################################
### DO NOT EDIT BELOW THIS LINE, UNLESS YOU KNOW EXACTLY WHAT HAPPENDS! ###
###########################################################################
Expand Down
21 changes: 20 additions & 1 deletion src/modules/crowsnest/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,25 @@ install_cleanup_trap

# Module only Variables
CN_BUILD_PACKAGE_FILE="/tmp/cn_packages.lst"
CN_BUILD_INSTALL_SH="/home/${BASE_USER}/crowsnest/tools/install.sh"

# Helper Func
is_raspbian() {
if [[ -f /boot/config.txt ]] && [[ -f /etc/rpi-issue ]]; then
echo "1"
else
echo "0"
fi
}

get_pkglist() {
if [[ "$(is_raspbian)" = "1" ]]; then
CN_BUILD_INSTALL_SH="/home/${BASE_USER}/crowsnest/tools/libs/pkglist-rpi.sh"
fi
if [[ "$(is_raspbian)" = "0" ]]; then
CN_BUILD_INSTALL_SH="/home/${BASE_USER}/crowsnest/tools/libs/pkglist-generic.sh"
fi
}


echo_green "Installing crowsnest ..."

Expand All @@ -38,6 +56,7 @@ gitclone CROWSNEST_REPO crowsnest

## Step 3: grep PKGLIST from install.sh for dependencies
echo_green "Generating packages file ..."
get_pkglist
grep "PKGLIST=" "${CN_BUILD_INSTALL_SH}" >> "${CN_BUILD_PACKAGE_FILE}"

## Step 4: Rename PKGLIST to Module usable Var
Expand Down

0 comments on commit 726239c

Please sign in to comment.