Linux install script fails on Ubuntu, 'fetch' command not available. Workaround or fix?

Hi all,

Tried to use the "linux" install "curl -f -s https://getchannels.com/dvr/setup.sh | sh"

What isn't said is this won't run on Ubuntu Linux as the 'fetch' command used in the setup script doesn't exist on Ubuntu.

Is there a fix or workaround?

Thanks in advance!

Try piping into bash instead of sh

Ta da! That worked. Good update for users to use bash for Ubuntu or if 'sh' doesn't work. Thank you for very fast response!!!

Can you share the output of these commands:

sh --version
bash --version

tom@nuc:~/Desktop$ sh --version
sh: 0: Illegal option --

tom@nuc:~/Desktop$ bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

tom@nuc:~/Desktop$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble

I guess I would disagree with that. I have been experimenting with a number of systems in the past week and have used the curl command listed above to successfully install Channels DVR Server multiple times on Ubuntu Desktop 22.04 & 24.04 and Ubuntu Server 22.04 & 24.04. I would note that I run the command as root: sudo curl -f -s https://getchannels.com/dvr/setup.sh | sh

Hi. It wasn't the 'curl' command failing, it was the 'fetch' command failing in the shell script pulled down using the 'curl' command. Sorry for the bad description. No disagreement. :blush:

fetch() is a function that tests if the script is being used with options to ignore any certificate validity errors or not.

fetch() {
  options=""
  if [ "$have_curl" = "1" ]; then
    test -n "$INSECURE_SSL" && options="--insecure"
    curl $options -f -s "$1" -o "$2"
  else
    test -n "$CURL_CA_BUNDLE" && options="--ca-certificate=$CURL_CA_BUNDLE"
    test -n "$INSECURE_SSL" && options="--no-check-certificate"
    wget -q $options -O "$2" "$1"
  fi
}

Would be interesting to see what the output from curl -f -s https://getchannels.com/dvr/setup.sh | sh -x would be. That extra -x should output exactly what is being called and where any errors exist.

Hi, perhaps I wasn't clear, also. I was not just referring to the curl command. What I meant is that when I run the command string:

sudo curl -f -s https://getchannels.com/dvr/setup.sh | sh

from the terminal window of any of those Ubuntu versions I cited, it executes without any errors being displayed and Channels DVR server is installed in my home directory. What I understood from your initial post is that when you ran the command from an Ubuntu terminal window, it did not result in Channels DVR being installed. If I misunderstood, apologies.

-k