Skip to content

Commit

Permalink
fixup healthcheck / reduce image size (#212)
Browse files Browse the repository at this point in the history
* remove unused hardware support

currently this container can only use rtl-sdr hardware, others can't be
configured
remove all the unneeded hardware support as it can't be used anyhow

keep around the Dockerfile that builds all that hardware support in case
anyone needs it for maybe another container or to add it back into this
one

* skyaware / dump1090-fa: avoid html directory duplication

* remove ca-certificates / curl from temp packages

already present in base image

* fixup healthcheck

log format changed moving to s6wrap breaking the healthcheck
fix the regex used so the new log format works with the healthcheck

* update readme
  • Loading branch information
wiedehopf authored Oct 22, 2024
1 parent 53a3625 commit 1626c5e
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 93 deletions.
87 changes: 4 additions & 83 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ RUN set -x && \
# Essentials
TEMP_PACKAGES+=(automake) && \
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(ca-certificates) && \
TEMP_PACKAGES+=(cmake) && \
# curl is included in the base image
# TEMP_PACKAGES+=(curl) && \
TEMP_PACKAGES+=(git) && \
TEMP_PACKAGES+=(pkg-config) && \
# s6-overlay dependencies
Expand All @@ -36,9 +33,6 @@ RUN set -x && \
# piaware-web dependencies
KEPT_PACKAGES+=(lighttpd) && \
KEPT_PACKAGES+=(lighttpd-mod-deflate) && \
# hackrf dependencies
KEPT_PACKAGES+=(libfftw3-bin) && \
TEMP_PACKAGES+=(libfftw3-dev) && \
# mlat-client dependencies
KEPT_PACKAGES+=(python3-minimal) && \
KEPT_PACKAGES+=(python3-pkg-resources) && \
Expand Down Expand Up @@ -66,64 +60,6 @@ RUN set -x && \
${TEMP_PACKAGES[@]} \
&& \
git config --global advice.detachedHead false && \
# Build & install HackRF
BRANCH_HACKRF=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/mossmann/hackrf.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_HACKRF" "https://github.com/mossmann/hackrf.git" "/src/hackrf" && \
pushd "/src/hackrf" && \
echo "hackrf $(git log | head -1 | tr -s ' ' '_')" >> /VERSIONS && \
popd && \
mkdir -p /src/hackrf/host/build && \
pushd /src/hackrf/host/build && \
cmake ../ -DCMAKE_BUILD_TYPE=Release && \
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# Build & install LimeSuite
git clone --depth 1 --branch stable "https://github.com/myriadrf/LimeSuite.git" "/src/LimeSuite" && \
pushd "/src/LimeSuite" && \
echo "LimeSuite commit_$(git log | head -1 | tr -s ' ' '_')" >> /VERSIONS && \
popd && \
mkdir "/src/LimeSuite/builddir" && \
pushd "/src/LimeSuite/builddir" && \
cmake \
../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
&& \
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# bladeRF: get latest release tag without cloning repo
BRANCH_BLADERF=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/Nuand/bladeRF.git' | grep -v '\^' | grep 'refs/tags/libbladeRF_' | cut -d '/' -f 3 | tail -1) && \
# bladeRF: clone repo
git clone \
--branch "$BRANCH_BLADERF" \
--depth 1 \
--single-branch \
'https://github.com/Nuand/bladeRF.git' \
/src/bladeRF \
&& \
pushd "/src/bladeRF" && \
echo "bladeRF $BRANCH_BLADERF" >> /VERSIONS && \
popd && \
# bladeRF: prepare to build
mkdir /src/bladeRF/build && \
pushd /src/bladeRF/build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DINSTALL_UDEV_RULES=ON \
../ \
&& \
# bladeRF: build & install
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# bladeRF: simple test
bladeRF-cli --version && \
# Build & install tcllauncher
BRANCH_TCLLAUNCHER=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/flightaware/tcllauncher.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v.*' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_TCLLAUNCHER" "https://github.com/flightaware/tcllauncher.git" "/src/tcllauncher" && \
Expand Down Expand Up @@ -157,13 +93,11 @@ RUN set -x && \
git clone --depth 1 --branch "$DUMP1090_VERSION" "https://github.com/flightaware/dump1090.git" "/src/dump1090" && \
pushd "/src/dump1090" && \
echo "dump1090 ${DUMP1090_VERSION}" >> /VERSIONS && \
make -j "$(nproc)" showconfig BLADERF=yes RTLSDR=yes HACKRF=yes LIMESDR=yes && \
make -j "$(nproc)" all BLADERF=yes RTLSDR=yes HACKRF=yes LIMESDR=yes -j && \
make -j "$(nproc)" faup1090 BLADERF=yes RTLSDR=yes HACKRF=yes LIMESDR=yes -j && \
make -j "$(nproc)" showconfig RTLSDR=yes && \
make -j "$(nproc)" all RTLSDR=yes -j && \
make -j "$(nproc)" faup1090 RTLSDR=yes -j && \
cp -v view1090 dump1090 /usr/local/bin/ && \
cp -v faup1090 /usr/lib/piaware/helpers/ && \
mkdir -p /usr/share/dump1090-fa/html && \
cp -a /src/dump1090/public_html/* /usr/share/dump1090-fa/html/ && \
mkdir -p /usr/share/skyaware/html && \
cp -a /src/dump1090/public_html/* /usr/share/skyaware/html && \
ldconfig && \
Expand All @@ -187,21 +121,8 @@ RUN set -x && \
make -j "$(nproc)" && \
cp -v ./beast-splitter /usr/local/bin/ && \
popd && \
# bladeRF: download bladeRF FPGA images
BLADERF_RBF_PATH="/usr/share/Nuand/bladeRF" && \
export BLADERF_RBF_PATH && \
mkdir -p "$BLADERF_RBF_PATH" && \
curl -L -o "$BLADERF_RBF_PATH/hostedxA4.rbf" https://www.nuand.com/fpga/hostedxA4-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/hostedxA9.rbf" https://www.nuand.com/fpga/hostedxA9-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/hostedx40.rbf" https://www.nuand.com/fpga/hostedx40-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/hostedx115.rbf" https://www.nuand.com/fpga/hostedx115-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbxA4.rbf" https://www.nuand.com/fpga/adsbxA4.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbxA9.rbf" https://www.nuand.com/fpga/adsbxA9.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbx40.rbf" https://www.nuand.com/fpga/adsbx40.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbx115.rbf" https://www.nuand.com/fpga/adsbx115.rbf && \
# Clean up
apt-get remove -y ${TEMP_PACKAGES[@]} && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y "${TEMP_PACKAGES[@]}" && \
apt-get clean -y && \
# remove pycache
{ find /usr | grep -E "/__pycache__$" | xargs rm -rf || true; } && \
Expand Down
214 changes: 214 additions & 0 deletions Dockerfile.all_sdrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:dump978-full

ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
VERBOSE_LOGGING="false"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008,SC2086,SC2039,SC2068
RUN set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
# Essentials
TEMP_PACKAGES+=(automake) && \
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(ca-certificates) && \
TEMP_PACKAGES+=(cmake) && \
# curl is included in the base image
# TEMP_PACKAGES+=(curl) && \
TEMP_PACKAGES+=(git) && \
TEMP_PACKAGES+=(pkg-config) && \
# s6-overlay dependencies
TEMP_PACKAGES+=(gnupg2) && \
TEMP_PACKAGES+=(file) && \
# libusb for a number of things
KEPT_PACKAGES+=(libusb-1.0-0) && \
TEMP_PACKAGES+=(libusb-1.0-0-dev) && \
# dump1090 dependencies
KEPT_PACKAGES+=(libatomic1) && \
KEPT_PACKAGES+=(libncurses6) && \
TEMP_PACKAGES+=(libncurses-dev) && \
# tcllauncher dependencies
KEPT_PACKAGES+=(tcl) && \
TEMP_PACKAGES+=(tcl-dev) && \
KEPT_PACKAGES+=(tcl-tls) && \
KEPT_PACKAGES+=(tclx) && \
# piaware-web dependencies
KEPT_PACKAGES+=(lighttpd) && \
KEPT_PACKAGES+=(lighttpd-mod-deflate) && \
# hackrf dependencies
KEPT_PACKAGES+=(libfftw3-bin) && \
TEMP_PACKAGES+=(libfftw3-dev) && \
# mlat-client dependencies
KEPT_PACKAGES+=(python3-minimal) && \
KEPT_PACKAGES+=(python3-pkg-resources) && \
TEMP_PACKAGES+=(python3-distutils) && \
TEMP_PACKAGES+=(python3-dev) && \
TEMP_PACKAGES+=(python3-setuptools) && \
# piaware dependencies
KEPT_PACKAGES+=(itcl3) && \
KEPT_PACKAGES+=(tcllib) && \
KEPT_PACKAGES+=(net-tools) && \
KEPT_PACKAGES+=(procps) && \
KEPT_PACKAGES+=(socat) && \
# beast-splitter dependencies
TEMP_PACKAGES+=(libboost1.74-dev) && \
TEMP_PACKAGES+=(libboost-system1.74-dev) && \
KEPT_PACKAGES+=(libboost-system1.74.0) && \
TEMP_PACKAGES+=(libboost-program-options1.74-dev) && \
KEPT_PACKAGES+=(libboost-program-options1.74.0) && \
TEMP_PACKAGES+=(libboost-regex1.74-dev) && \
KEPT_PACKAGES+=(libboost-regex1.74.0) && \
# Install packages.
apt-get update && \
apt-get install -y --no-install-recommends \
${KEPT_PACKAGES[@]} \
${TEMP_PACKAGES[@]} \
&& \
git config --global advice.detachedHead false && \
# Build & install HackRF
BRANCH_HACKRF=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/mossmann/hackrf.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_HACKRF" "https://github.com/mossmann/hackrf.git" "/src/hackrf" && \
pushd "/src/hackrf" && \
echo "hackrf $(git log | head -1 | tr -s ' ' '_')" >> /VERSIONS && \
popd && \
mkdir -p /src/hackrf/host/build && \
pushd /src/hackrf/host/build && \
cmake ../ -DCMAKE_BUILD_TYPE=Release && \
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# Build & install LimeSuite
git clone --depth 1 --branch stable "https://github.com/myriadrf/LimeSuite.git" "/src/LimeSuite" && \
pushd "/src/LimeSuite" && \
echo "LimeSuite commit_$(git log | head -1 | tr -s ' ' '_')" >> /VERSIONS && \
popd && \
mkdir "/src/LimeSuite/builddir" && \
pushd "/src/LimeSuite/builddir" && \
cmake \
../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
&& \
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# bladeRF: get latest release tag without cloning repo
BRANCH_BLADERF=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/Nuand/bladeRF.git' | grep -v '\^' | grep 'refs/tags/libbladeRF_' | cut -d '/' -f 3 | tail -1) && \
# bladeRF: clone repo
git clone \
--branch "$BRANCH_BLADERF" \
--depth 1 \
--single-branch \
'https://github.com/Nuand/bladeRF.git' \
/src/bladeRF \
&& \
pushd "/src/bladeRF" && \
echo "bladeRF $BRANCH_BLADERF" >> /VERSIONS && \
popd && \
# bladeRF: prepare to build
mkdir /src/bladeRF/build && \
pushd /src/bladeRF/build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DINSTALL_UDEV_RULES=ON \
../ \
&& \
# bladeRF: build & install
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# bladeRF: simple test
bladeRF-cli --version && \
# Build & install tcllauncher
BRANCH_TCLLAUNCHER=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/flightaware/tcllauncher.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v.*' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_TCLLAUNCHER" "https://github.com/flightaware/tcllauncher.git" "/src/tcllauncher" && \
pushd "/src/tcllauncher" && \
echo "tcllauncher ${BRANCH_TCLLAUNCHER}" >> /VERSIONS && \
autoconf && \
./configure --prefix=/opt/tcl && \
make -j "$(nproc)" && \
make install && \
ldconfig && \
popd && \
# Build & install piaware
BRANCH_PIAWARE=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/flightaware/piaware.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v.*' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_PIAWARE" "https://github.com/flightaware/piaware.git" "/src/piaware" && \
pushd "/src/piaware" && \
echo "piaware ${BRANCH_PIAWARE}" >> /VERSIONS && \
make -j "$(nproc)" install && \
cp -v /src/piaware/package/ca/*.pem /etc/ssl/ && \
touch /etc/piaware.conf && \
mkdir -p /run/piaware && \
ldconfig && \
popd && \
# Build & install piaware-web
git clone "https://github.com/flightaware/piaware-web.git" "/src/piaware-web" && \
cp -Rv /src/piaware-web/web/. /var/www/html/ && \
# Symlink for skyaware978
ln -vs /usr/share/dump978-fa /usr/share/skyaware978 && \
# get dump1090 sources
DUMP1090_VERSION=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/flightaware/dump1090.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v.*' | tail -1) && \
export DUMP1090_VERSION && \
git clone --depth 1 --branch "$DUMP1090_VERSION" "https://github.com/flightaware/dump1090.git" "/src/dump1090" && \
pushd "/src/dump1090" && \
echo "dump1090 ${DUMP1090_VERSION}" >> /VERSIONS && \
make -j "$(nproc)" showconfig BLADERF=yes RTLSDR=yes HACKRF=yes LIMESDR=yes && \
make -j "$(nproc)" all BLADERF=yes RTLSDR=yes HACKRF=yes LIMESDR=yes -j && \
make -j "$(nproc)" faup1090 BLADERF=yes RTLSDR=yes HACKRF=yes LIMESDR=yes -j && \
cp -v view1090 dump1090 /usr/local/bin/ && \
cp -v faup1090 /usr/lib/piaware/helpers/ && \
mkdir -p /usr/share/skyaware/html && \
cp -a /src/dump1090/public_html/* /usr/share/skyaware/html && \
ldconfig && \
popd && \
dump1090 --version && \
# Build & install mlat-client
BRANCH_MLATCLIENT=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/mutability/mlat-client.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v.*' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_MLATCLIENT" "https://github.com/mutability/mlat-client.git" "/src/mlat-client" && \
pushd /src/mlat-client && \
BRANCH_MLATCLIENT="$(git tag --sort='-creatordate' | head -1)" && \
echo "mlat-client ${BRANCH_MLATCLIENT}" >> /VERSIONS && \
./setup.py install && \
ln -s /usr/local/bin/fa-mlat-client /usr/lib/piaware/helpers/ && \
ldconfig && \
popd && \
# Build & install beast-splitter
BRANCH_BEASTSPLITTER=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' 'https://github.com/flightaware/beast-splitter.git' | grep -v '\^' | cut -d '/' -f 3 | grep '^v.*' | tail -1) && \
git clone --depth 1 --branch "$BRANCH_BEASTSPLITTER" "https://github.com/flightaware/beast-splitter.git" "/src/beast-splitter" && \
pushd "/src/beast-splitter" && \
echo "beast-splitter ${BRANCH_BEASTSPLITTER}" >> /VERSIONS && \
make -j "$(nproc)" && \
cp -v ./beast-splitter /usr/local/bin/ && \
popd && \
# bladeRF: download bladeRF FPGA images
BLADERF_RBF_PATH="/usr/share/Nuand/bladeRF" && \
export BLADERF_RBF_PATH && \
mkdir -p "$BLADERF_RBF_PATH" && \
curl -L -o "$BLADERF_RBF_PATH/hostedxA4.rbf" https://www.nuand.com/fpga/hostedxA4-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/hostedxA9.rbf" https://www.nuand.com/fpga/hostedxA9-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/hostedx40.rbf" https://www.nuand.com/fpga/hostedx40-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/hostedx115.rbf" https://www.nuand.com/fpga/hostedx115-latest.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbxA4.rbf" https://www.nuand.com/fpga/adsbxA4.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbxA9.rbf" https://www.nuand.com/fpga/adsbxA9.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbx40.rbf" https://www.nuand.com/fpga/adsbx40.rbf && \
curl -L -o "$BLADERF_RBF_PATH/adsbx115.rbf" https://www.nuand.com/fpga/adsbx115.rbf && \
# Clean up
apt-get remove -y ${TEMP_PACKAGES[@]} && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
apt-get clean -y && \
# remove pycache
{ find /usr | grep -E "/__pycache__$" | xargs rm -rf || true; } && \
rm -rf /src /tmp/* /var/lib/apt/lists/* /var/log/* /var/cache/* && \
# Store container version
grep piaware /VERSIONS | cut -d " " -f 2 > /IMAGE_VERSION

COPY rootfs/ /

EXPOSE 80/tcp 30003/tcp 30005/tcp 30105/tcp 30978/tcp 30979/tcp

HEALTHCHECK --start-period=7200s --interval=600s CMD /scripts/healthcheck.sh
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/mikenye/piaware/latest)](https://hub.docker.com/r/mikenye/piaware)
[![Discord](https://img.shields.io/discord/734090820684349521)](https://discord.gg/sTf9uYF)

FlightAware's PiAware docker container including support for RTL-SDR, bladeRF and others. Includes `dump1090` and `dump978`.
FlightAware's PiAware docker container including support for RTL-SDR. Includes `dump1090` and `dump978`.

Builds and runs on `linux/amd64`, `linux/386`, `linux/arm/v7` and `linux/arm64`.

For more information on what PiAware is, see here: [FlightAware - PiAware](https://flightaware.com/adsb/piaware/).

This container can operate in "net only" mode and pull ADS-B Mode-S & UAT data from another host/container. **This is the recommended way of deploying the container**, and I'd humbly suggest [`sdr-enthusiasts/docker-readsb-protobuf`](https://github.com/sdr-enthusiasts/docker-readsb-protobuf) and [`sdr-enthusiasts/docker-dump978`](https://github.com/sdr-enthusiasts/docker-dump978) (if you live in an area that uses UAT).

_Note:_ `bladerf`/`hackrf`/`limesdr`/`radarcape` - Support for these is compiled in, but I need to complete the wrapper/helper scripts. I don't have access to these devices. If you do, and would be willing to test, please get in touch with me!
This container can operate in "net only" mode and pull ADS-B Mode-S & UAT data from another host/container. **This is the recommended way of deploying the container**, see [this guide](https://sdr-enthusiasts.gitbook.io/ads-b).

## Note for Users running 32-bit Debian Buster-based OSes on ARM

Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/lighttpd/skyaware.lighttpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ server.stat-cache-engine = "disable"

alias.url += (
"/dump1090-fa/data/" => "/run/dump1090-fa/",
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/",
"/dump1090-fa/" => "/usr/share/skyaware/html/",
)

# redirect the slash-less URLs
Expand Down
4 changes: 2 additions & 2 deletions rootfs/etc/s6-overlay/scripts/01-piaware
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ fi

# If BINGMAPSAPIKEY is set, modify dump1090's config.js to include it
if [ -n "${BINGMAPSAPIKEY}" ]; then
echo "INFO: setting BINGMAPSAPIKEY in /usr/share/dump1090-fa/html/config.js"
echo "INFO: setting BINGMAPSAPIKEY in /usr/share/skyaware/html/config.js"

sed \
-i \
"/^BingMapsAPIKey = /c\BingMapsAPIKey = "'"'"${BINGMAPSAPIKEY}"'"'";" \
/usr/share/dump1090-fa/html/config.js
/usr/share/skyaware/html/config.js

fi

Expand Down
4 changes: 2 additions & 2 deletions rootfs/etc/s6-overlay/scripts/watchdog
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fi


# make sure /var/log/piaware/current doesn't grow too large
if (( $(wc -l < /var/log/piaware/current) > 400 )); then
keep=$(tail -n200 /var/log/piaware/current)
if (( $(wc -l < /var/log/piaware/current) > 800 )); then
keep=$(tail -n400 /var/log/piaware/current)
truncate -s 0 /var/log/piaware/current
cat >> /var/log/piaware/current <<< "$keep"
fi
Loading

0 comments on commit 1626c5e

Please sign in to comment.