-
-
Save qguv/6f76e4e8178e8398b66a6da3780acc65 to your computer and use it in GitHub Desktop.
#!/bin/sh | |
set -e | |
jre_url='https://cdn.azul.com/zulu-embedded/bin/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf.tar.gz' | |
jre_sha1sum=ac884e478a58db9aa3c109d2d43b819504ba6969 | |
jre_dest=/storage | |
bubbleupnp_url='https://bubblesoftapps.com/bubbleupnpserver/BubbleUPnPServer-distrib.zip' | |
bubbleupnp_sha1sum=ac87fe841b407413c35b1bfe06ee572fbe1c81d8 | |
bubbleupnp_dest=/storage/bubbleupnp | |
echo Downloading jre | |
mkdir -p "$jre_dest" | |
jre_archive="${jre_url##*/}" | |
curl -L "$jre_url" -o "$jre_dest/$jre_archive" | |
if [ -n "$jre_sha1sum" ]; then | |
echo Verifying jre | |
printf '%s %s\n' "$jre_sha1sum" "$jre_dest/$jre_archive" \ | |
| sha1sum -c /dev/stdin | |
fi | |
echo Downloading bubbleupnp | |
mkdir -p "$bubbleupnp_dest" | |
bubbleupnp_archive="${bubbleupnp_url##*/}" | |
curl -L "$bubbleupnp_url" -o "$bubbleupnp_dest/$bubbleupnp_archive" | |
if [ -n "$bubbleupnp_sha1sum" ]; then | |
echo Verifying bubbleupnp | |
printf '%s %s\n' "$bubbleupnp_sha1sum" "$bubbleupnp_dest/$bubbleupnp_archive" \ | |
| sha1sum -c /dev/stdin | |
fi | |
echo Extracting jre | |
(cd "$jre_dest" && tar xf "$jre_archive" && rm "$jre_archive") | |
echo Extracting bubbleupnp | |
(cd "$bubbleupnp_dest" && unzip "$bubbleupnp_archive" && rm "$bubbleupnp_archive") | |
chmod u+x "$bubbleupnp_dest/launch.sh" | |
autostart_d=/storage/.config/autostart.d | |
if ! [ -d "$autostart_d" ]; then | |
echo Configuring startup script directory | |
(set -v | |
mkdir -p "$autostart_d" | |
) | |
autostart_sh=/storage/.config/autostart.sh | |
if [ -e "$autostart_sh" ]; then | |
(set -v | |
cp "$autostart_sh" "$autostart_d/50-existing.sh" | |
) | |
fi | |
(set -v | |
cat >"$autostart_sh" <<-EOF | |
#!/bin/sh | |
for f in $autostart_d/*; do | |
"\$f" | |
done | |
EOF | |
chmod u+x "$autostart_sh" | |
) | |
fi | |
echo Enabling bubbleupnp at system startup | |
bubbleupnp_autostart="$autostart_d/80-bubbleupnp.sh" | |
cat >"$bubbleupnp_autostart" <<-EOF | |
#!/bin/sh | |
PATH="\$PATH:/storage/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf/bin" \\ | |
nohup "$bubbleupnp_dest/launch.sh" & | |
EOF | |
chmod u+x "$bubbleupnp_autostart" |
I responded to your email last week @jackojmi 🤷♂️
Oh- I never got the email.
Op 2020-10-09 15:44 schreef @jackojmi:
I hope it’s OK to contact you. I found your email and script (https://gist.github.com/qguv/6f76e4e8178e8398b66a6da3780acc65) on github, and am trying to get it running on my LibreELEC machine.
Java is my issue! I’m wondering if/how you were able to install Java. Please forgive my low knowledge of Linux!
Op 2020-10-09 15:57 schreef @qguv:
Thanks for reaching out :)
The gist you mentioned installs a portable installation of the Java 1.8 runtime environment called zulu by pulling it directly from the website of the zulu-embedded project.
It then simply downloads and extracts the bubbleUPNP files from the bubbleUPNP site.
I did eventually get it working but I didn't end up liking the workflow so much; I'm considering switching to jellyfin.org instead, which I've heard has better streaming support. I was looking for a sort of "self-hosted Netflix" that I can just log into from a remote PC.
The script in the gist can also just be executed line-by-line in a shell. You can skip the checksum verification steps by clearing out the checksum variables; this was just to check whether the files downloaded correctly. The files may have been updated since I made the script, which would mean the checksums would also need to be updated.
Hope that helps!
Thanks, appreciate it!! Will try to get working!!
Hello,
Is there a way to install this on LibreELEC (Ie as an add-on?) I wish to use a bubbleUPnP server on LE but don't know how. Thanks.