Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/guysoft/OctoPi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/octopi/start_chroot_script')
-rwxr-xr-xsrc/modules/octopi/start_chroot_script41
1 files changed, 9 insertions, 32 deletions
diff --git a/src/modules/octopi/start_chroot_script b/src/modules/octopi/start_chroot_script
index 91e08e9..7c3b03f 100755
--- a/src/modules/octopi/start_chroot_script
+++ b/src/modules/octopi/start_chroot_script
@@ -11,7 +11,7 @@ export LC_ALL=C
source /common.sh
-if [ -n "$OCTOPI_APTMIRROR" ];
+if [ -n "$OCTOPI_APTMIRROR" ];
then
echo "Switching apt mirror in /etc/apt/sources.list to $OCTOPI_APTMIRROR"
cp /etc/apt/sources.list /etc/apt/sources.list.backup
@@ -19,8 +19,6 @@ then
fi
WEBCAM_USER=webcam
-FFMPEG_HLS_COMMIT=c6fdbe26ef30fff817581e5ed6e078d96111248a
-FFMPEG_HLS_DIR=/opt/ffmpeg-hls
### Script ####
@@ -68,7 +66,7 @@ pushd /home/"${BASE_USER}"
apt-get -y --force-yes install libjpeg8-dev
fi
fi
-
+
apt-get -y --force-yes --no-install-recommends install imagemagick ffmpeg libv4l-dev
wget $OCTOPI_MJPGSTREAMER_ARCHIVE -O mjpg-streamer.zip
@@ -122,32 +120,11 @@ EOT
# FFMPEG HLS
if [ "$OCTOPI_INCLUDE_FFMPEG_HLS" == "yes" ]
then
- apt-get install -y --force-yes --no-install-recommends nginx
-
- FFMPEG_BUILD_DIR=$(mktemp -d)
- pushd ${FFMPEG_BUILD_DIR}
- FFMPEG_ARCHIVE=ffmpeg.tar.gz
- wget https://api.github.com/repos/FFmpeg/FFmpeg/tarball/${FFMPEG_COMMIT} -O ${FFMPEG_ARCHIVE}
- tar xvzf ${FFMPEG_ARCHIVE}
- cd FFmpeg*
- ./configure \
- --disable-doc \
- --disable-htmlpages \
- --disable-manpages \
- --disable-podpages \
- --disable-txtpages \
- --disable-ffplay \
- --disable-ffprobe
- make -j$(nproc)
- mkdir -p ${FFMPEG_HLS_DIR}
- cp ffmpeg ${FFMPEG_HLS_DIR}
- popd
- rm -r ${FFMPEG_BUILD_DIR}
-
+ apt-get install -y --force-yes --no-install-recommends ffmpeg nginx
useradd ${WEBCAM_USER}
usermod -aG video ${WEBCAM_USER}
fi
-
+
#CuraEngine
if [ "$OCTOPI_INCLUDE_CURAENGINE" == "yes" ]
then
@@ -174,7 +151,7 @@ EOT
# fetch current yq build and install to /usr/local/bin
wget -O yq $OCTOPI_YQ_DOWNLOAD && chmod +x yq && mv yq /usr/local/bin
-
+
popd
#Make sure user pi / ${BASE_USER} has access to serial ports
@@ -220,13 +197,13 @@ do
done
for ip in $(hostname -I);
-do
+do
echo " http://$ip"
done
echo
echo "https is also available, with a self-signed certificate."
-echo
+echo
echo "------------------------------------------------------------"
echo
EOT
@@ -299,7 +276,7 @@ systemctl_if_exists enable streamer_select.service
if [ "$OCTOPI_INCLUDE_MJPGSTREAMER" == "yes" ]
then
systemctl_if_exists enable webcamd.service
-### use legacy camera stack on bullseye for now
+### use legacy camera stack on bullseye for now
if grep "camera_auto_detect=1" /boot/config.txt
then
sed -i "s/camera_auto_detect=1/camera_auto_detect=0/g" /boot/config.txt
@@ -327,7 +304,7 @@ apt-get -y install avrdude
apt-get clean
apt-get autoremove -y
-if [ -n "$OCTOPI_APTMIRROR" ];
+if [ -n "$OCTOPI_APTMIRROR" ];
then
echo "Reverting /etc/apt/sources.list"
mv /etc/apt/sources.list.backup /etc/apt/sources.list