How can I install packages for custom support scripts?

  • I have several Raspberry Pi's and on all of them I run some custom bash shell scripts for monitoring purposes. For example, I have one to monitor for temperature going to high, another to monitor for under-voltage condition, etc. If there are problems, it seems me an email, so that I can work on it.

    I would like to run these scripts on my LibreElec server as well, but I cannot install the packages necessary to do so.

    Is there any way to install packages on the LibreElec image? Or possibly install LibreElec on top of a "normal" Raspberry Pi OS installation?

    Or do I have to just hope that this server never overheats or drops below the power requirements?

  • Start by telling us what binaries or data you need and we can give some specific advice on how to get them. There is deliberately no way to install deb/rpm packages in the OS but that's not necessarily the end of the story.

  • I haven't looked for all of the apps I need, I just started running my provisioning script, that I wrote so that I didn't have to remember everything I do when I set up a new Pi, but the biggies are:

    Email (outbound); gpg; Dropbox-Uploader

    I think those are the main ones that I load onto all of my non-primary server, that aren't completely critical for my scripts. I don't have your standalone image running right now (I'm seeing what happens if I install Kodi on top of a full OS install), so I'm assuming that basic commands like tar, tree, cp, mv, etc are available. I don't really know how much else I'm missing without actually trying to execute my custom scripts.

    I should explain that I was I.T. for 37+ years, so I kind of expect to be able to do whatever I think is needed on all the servers I support. I never developed a "user" mindset, whereby someone else decides what's best for my machines.

  • Oh, I also need /usr/bin/vcgencmd in order to determine both the current temperature of the CPU/GPU, and whether it has been throttled due to under-current situations.

  • LibreELEC is an intentionally simple distro but we should support all the normal bash scripting commands because we use the same things within the distro. Note that we use busybox for lots of things which can reduce command options. The full /usr/bin/vcgencmd binary exists in the image already.

    For things like GPG and Dropbox we don't have any native capabilities and unless you want to build custom images that you added more packages to (do-able but probably more work than you're looking for as we build everything from source) the main escape route will be using Docker (installed as a Kodi add-on) to run a container that provides whatever binary that you're missing. You get bonus credit for authoring your own container that adds all the missing stuff in one container to avoid running loads of containers (overhead you don't need, and the one thing that's likely to result in high temps etc.).

    NB: While I understand that some users like to monitor everything, the controlled and appliance-like nature of the distro also largely eliminates the scenarios where general purpose distros drift into bad shape over time requiring monitoring. LE is super lightweight and highly optimised for Pi hardware and with normal movie watching duties the only thing that's needed for avoiding high temp and under-volt scenarios is a half-decent passive or fan-cooled case and the official PSU. I've managed enough infrastructure over time myself to understand the inner need to monitor, but watching movies is more fun ;)