Skip to content

Commit 726239c

Browse files
authored
chore: update crowsnest module (#221)
* 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>
1 parent b07d7a1 commit 726239c

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

config/raspberry/default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Declare Variables before exporting.
55
# See https://www.shellcheck.net/wiki/SC2155
66

7-
BASE_IMAGE_ENLARGEROOT=3000
7+
BASE_IMAGE_ENLARGEROOT=4500
88
BASE_IMAGE_RESIZEROOT=600
99
# Compress not needed due compression done in workflow
1010
BASE_RELEASE_COMPRESS=no

src/modules/crowsnest/config

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#### crowsnest - A webcam Service for multiple Cams and Stream Services.
33
####
44
#### Written by Stephan Wendel aka KwadFan <me@stephanwe.de>
5-
#### Copyright 2021 - 2022
5+
#### Copyright 2021 - till today
66
#### https://github.com/mainsail-crew/crowsnest
77
####
88
#### This File is distributed under GPLv3
@@ -18,7 +18,6 @@
1818
[[ -n "$CROWSNEST_CONFIG_PATH" ]] || CROWSNEST_CONFIG_PATH="/home/${BASE_USER}/printer_data/config"
1919
[[ -n "$CROWSNEST_LOG_PATH" ]] || CROWSNEST_LOG_PATH="/home/${BASE_USER}/printer_data/logs"
2020
[[ -n "$CROWSNEST_ENV_PATH" ]] || CROWSNEST_ENV_PATH="/home/${BASE_USER}/printer_data/systemd"
21-
[[ -n "$CROWSNEST_RASPICAMFIX" ]] || CROWSNEST_RASPICAMFIX="1"
2221
[[ -n "$CROWSNEST_ADD_CROWSNEST_MOONRAKER" ]] || CROWSNEST_ADD_CROWSNEST_MOONRAKER="1"
2322
[[ -n "$CROWSNEST_MOONRAKER_CONF_PATH" ]] || CROWSNEST_MOONRAKER_CONF_PATH="/home/${BASE_USER}/printer_data/config/moonraker.conf"
2423

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

29+
# camera-streamer
30+
[[ -n "$CROWSNEST_CAMERA_STREAMER_REPO_SHIP" ]] || CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/ayufan/camera-streamer.git"
31+
[[ -n "$CROWSNEST_CAMERA_STREAMER_REPO_BRANCH" ]] || CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="master"
32+
3033
###########################################################################
3134
### DO NOT EDIT BELOW THIS LINE, UNLESS YOU KNOW EXACTLY WHAT HAPPENDS! ###
3235
###########################################################################

src/modules/crowsnest/start_chroot_script

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,25 @@ install_cleanup_trap
2020

2121
# Module only Variables
2222
CN_BUILD_PACKAGE_FILE="/tmp/cn_packages.lst"
23-
CN_BUILD_INSTALL_SH="/home/${BASE_USER}/crowsnest/tools/install.sh"
23+
24+
# Helper Func
25+
is_raspbian() {
26+
if [[ -f /boot/config.txt ]] && [[ -f /etc/rpi-issue ]]; then
27+
echo "1"
28+
else
29+
echo "0"
30+
fi
31+
}
32+
33+
get_pkglist() {
34+
if [[ "$(is_raspbian)" = "1" ]]; then
35+
CN_BUILD_INSTALL_SH="/home/${BASE_USER}/crowsnest/tools/libs/pkglist-rpi.sh"
36+
fi
37+
if [[ "$(is_raspbian)" = "0" ]]; then
38+
CN_BUILD_INSTALL_SH="/home/${BASE_USER}/crowsnest/tools/libs/pkglist-generic.sh"
39+
fi
40+
}
41+
2442

2543
echo_green "Installing crowsnest ..."
2644

@@ -38,6 +56,7 @@ gitclone CROWSNEST_REPO crowsnest
3856

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

4362
## Step 4: Rename PKGLIST to Module usable Var

0 commit comments

Comments
 (0)