Ubuntu Server 22.04

Tomorrow Ubuntu 22.04 should released and so my question. Has already someone upgraded (with do-release-update -d) to the new version and see problems with this version?

If you’re on 20.04 Long-Term Support, then I’d recommend waiting. I’d certainly try the upgrade in a VM first. Also the Release Candidate has only just been published, so I don’t expect the final build for a couple of days.

1 Like

I installed Roon on a freshly installed Ubuntu 22.04 LTS server last night. do-release-upgrade from 20.04 did not work for me, but that was probably user error. After a fresh install of ubuntu server 22.04 from USB, and installing a couple of extra dependencies (lbzip2 and libnss-mdns) Roon server is working without issue.

To complete the install, I ssh’d into the server, then:

sudo apt update
sudo apt install -y lbzip2
sudo apt install -y ffmpeg
sudo apt install -y libasound2
sudo apt install -y cifs-utils
sudo apt install -y libnss-mdns
curl -O http://download.roonlabs.com/builds/roonserver-installer-linuxx64.sh
chmod +x roonserver-installer-linuxx64.sh
sudo ./roonserver-installer-linuxx64.sh
1 Like

Good news.
I have been running Ubuntu server 22.04 also on a RPI installed with Roon bridge.

Works perfect

A current LTS release doesn’t show available upgrades until the point release, e.g., 22.04.1, is out, which is usually around September.

Incidentally, I attempted an upgrade on my MacBook Pro and this failed. However, the hardware and build is uncommon, so I’m not too surprised. A fresh install went smoothly.

I won’t be updating my servers for some months, if not longer.

2 Likes

Yeah I was kicking myself after the do-release-upgrade caused a kernel panic on boot. Definitely agree anybody already running 20.04 will be best to stay put for now.

I just updated my RoonCore (NUC7i3BNK) from Focal Fossa 20.04.4 LTS server to Jammy Jellyfish 22.04 LTS server with do-release-upgrade and it worked like a charm.

I just had to uninstall/reinstall QuteBrowser and update my ~/.config/qutebrowser/config.py (I’m using QuteBrowser as display).

Everything else is running without a glitch. :ok_hand:

2 Likes

Just upgraded to Ubuntu 22.04 using the “do-release-upgrade -d” option and Roon Server is working for me on Intel NUC.

4 Likes

Ubuntu works perfectly.

2 Likes

In the evening I’ve now also updated to server 22.04.
Roon itself had no problems with it, but:

  • Logitech Mediaserver → you’ve to install a nightly build from 8.3, because Ubuntu has updated perl
  • liquidsoap cannot build with the Focal OPAM, because there isn’t a version for Ubuntu 22.04, but I solved it with installing with options from a new installed OPAM.

@Mark_Mitchell I just wanted to say thank you for your post. The roon instructions did not work for me. But your very clear and concise guide helped me with the installatiin and i now have the headless server i wanted. Roon should take your post and include it in their setup guide

1 Like

Here are a couple of tweaks I found for Roon on Ubuntu Server. The first is using the low latency kernel instead of the generic one that is installed by default. The second is installing the Ubuntu Studio tweaks - this seems to just affect swappiness which I was changing anyhow, but it’s all wrapped up in a nice package. I’m running headless on a low power machine, and both these worked for me. Free to try…

Instructions to install the low latency kernel

Instruction to install the Ubuntu Studio tweaks

I’m very keen to know if anyone has other optimisations or tweaks to share for Roon on Ubuntu Server.

4 Likes

As a weekend project I installed RoonServer using Ubuntu Server 22.04.1 LTS as a base OS on my NUC7i3 which is usually running ROCK.
I used an old unused SSD (OCZ Vertex 2) in an USB 2 case so i didn’t need to mess with the ROCK install (disabled the PCI M.2 Slot in BIOS to be safe).

Works fine, thanks to @Mark_Mitchell for the complete list of dependencies.
As a side note: The download location for the install script meanwhile has changed to
https://download.roonlabs.net/builds/roonserver-installer-linuxx64.sh

Also thanks to @AHHYAYA for the performance tweaks. Still available and working.

The above mentioned dual install (ROCK on internal M.2 SSD, Ubuntu on external USB SSD) works fine. Both installations access the music data on the internal 2.5" SSD inside the NUC and it’s a matter of 1 minute to change between ROCK and Ubuntu for comparison purposes by booting either into ROCK or into Ubuntu using the NUC boot menu (F10).

First impressions:
RoonServer on Ubuntu runs even faster than ROCK.
User experience on the Remote is identical (both snappy), but the performance indicator in the Signal Path using upsampling and convolution on 44.1/16 files shows 13x for ROCK and 19x for Ubuntu (no big difference, I know).
Without upsampling, using only convolution, the indicator isn’t even triggered on Ubuntu while ROCK drops to 80x.

That was unexpected since Rock presumably being lightweight and optimized for Room and Ubuntu being possibly throttled by installation on an much slower USB drive - which is holding the Roon database as well.

An additional M.2 SSD is on order, so let’s see what can be accomplished by moving the Ubuntu install to a faster drive inside the NUC…

2 Likes

Ubuntu Server has been running really well for me since my post above. I’m now running version 22.10 with the 22.10 versions of the packages I listed above with no problems.

Here are some additional things I’ve tweaked… These are more general guidance rather than specific instructions as what to do will be different for different hardware.

  1. Remove interrupts for unused/irrelevant devices - the command “cat /proc/interrupts” will show interrupts, and any not needed may be able to be disabled through kernel parameters during boot. As an example I’m using older hardware that has PS/2 ports for the mouse and keyboard that I don’t need for music playback, so I disable them by editing /etc/default/grub to have GRUB_CMDLINE_LINUX=“i8042.noaux i8042.nokbd”, then update grub using “sudo update-grub”. Because my server connects to my endpoint via ethernet I also disable USB, and a bunch of other things. The kernel parameters being passed are described here The kernel’s command-line parameters — The Linux Kernel documentation. I always connect to my server using SSH, so don’t need a keyboard, but if I did I’d change that parameter and update grub again.

  2. Disable unused services. You can check what is running on your server with a command like “ps -ef”. Some services may be related to a package that can be removed, e.g. “sudo apt-get remove polkitd”, some can be disabled through the command line, e.g. “sudo systemctl stop rpcbind” then “sudo systemctl disable rpcbind”.

Be careful when doing either of these as disabling the wrong thing could make the OS unresponsive and require a reinstall. I didn’t post this earlier as it’s not strictly required because performance is OK with the default install, but it’s fun for someone like me who likes to tweak things. I used to do UNIX programming back in the day, so know enough to generally keep out of trouble :slight_smile:

1 Like

The additional M.2 SSD has arrived and I did a fresh install on it mounted inside the NUC. Results are consistent with the above mentioned experimental USB-Installation.
Moving the SSD inside the NUC maybe speeds up the boot time a bit, but has no noticeable impact on Roon performance itself (neither user experience, nor processing speed on upsampling etc.).
So I moved the M.2 SSD in an external USB3.2 case to re-establish the dual boot scenario (Rock on internal SSD / Ubuntu on external SSD). With the high-speed USB attachment, there’s hardly any difference to tell from then internal installation.

I did additional processing speed comparisons between ROCK/Ubuntu before and after applying the performance tweaks (real time kernel, Ubuntu Studio Tweaks).

Without the performance tweaks the processing speed indicator shows pretty much the same numbers for ROCK and Ubuntu.
The real time kernel improves performance only a little bit, judging from the processing speed indicator.
The largest effect is achieved through the Ubuntu Studio Tweaks.
In all cases CPU usage as seen in htop is far below 10%, so nothing critical whatsoever.

I think I’ll stick with Ubuntu especially for security reasons (no guest access to the machine) and reconsider once Roon pushes out RoonOS 2.0.

New install script is not working for me (https://download.roonlabs.net/builds/roonserver-installer-linuxx64.sh) Does any have an update way to install Roon in Ubuntu Server? Thanks in advance!

What is the error message?

I am getting the following line of text:

#!/bin/bash

blow up on non-zero exit code

set -e

these are replaced by build.sh

PACKAGE_NAME=RoonServer
ARCH=x64
PACKAGE_URL=https://download.roonlabs.net/builds/RoonServer_linuxx64.tar.bz2
PACKAGE_FILE=${PACKAGE_NAME}_linux${ARCH}.tar.bz2
PACKAGE_NAME_LOWER=echo "$PACKAGE_NAME" | tr "[A-Z]" "[a-z]"

TMPDIR=mktemp -d
MACHINE_ARCH=uname -m
OK=0

CLEAN_EXIT=0

for colorization

ESC_SEQ=“\033[”
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
COL_CYAN=$ESC_SEQ"36;01m"
COL_BOLD=$ESC_SEQ"1m"

function hr {
echo -e “${COL_BOLD}--------------------------------------------------------------------------------------${COL_RESET}”
}

function clean_up {
rm -Rf $TMPDIR
if [ x$CLEAN_EXIT != x1 ]; then
echo “”
hr
echo “”
echo -e “${COL_BOLD}${COL_RED}The $PACKAGE_NAME installer did not complete successfully.${COL_RESET}”
echo “”
echo “If you are not sure how to proceed, please check out:”
echo “”
echo " - Roon Labs Community Support - Roon Labs Community"
echo " - Roon Labs Knowledge Base https://kb.roonlabs.com/LinuxInstall"
echo “”
hr
echo “”
fi
}
trap clean_up EXIT

function install {
#
# Print banner/message
#
echo “”
hr
echo “”
echo -e “${COL_BOLD}Welcome to the $PACKAGE_NAME installer${COL_RESET}”
echo “”
echo “This installer sets up $PACKAGE_NAME to run on linux with the following settings:”
echo “”
echo " - $PACKAGE_NAME will be installed in /opt/$PACKAGE_NAME"
echo " - $PACKAGE_NAME’s data will be stored in /var/roon/$PACKAGE_NAME"
echo " - $PACKAGE_NAME will be configured to run as a system service"
echo " - $PACKAGE_NAME will run as root"
echo “”
echo “These settings are suitable for turning a dedicated or semi-dedicated device”
echo “into an appliance that runs $PACKAGE_NAME”
echo “”
echo “If you want customize how $PACKAGE_NAME is installed, see:”
echo “”
echo " http://kb.roonlabs.com/LinuxInstall"
echo “”
hr
echo “”

#
# Check for linux (in case someone runs on OS X, Cygwin, BSD, etc)
#
case `uname -s` in 
    Linux)
        ;;
    *)
        echo -e "${COL_RED}${COL_BLOLD}Error:${COL_RESET} This package is intended for Linux platforms. It is not compatible with your machine. Exiting."
        ;;
esac

#
# Check for proper architecture
#
case "$MACHINE_ARCH" in
    armv7*)
        if [ x$ARCH = xarmv7hf ]; then OK=1; fi
        ;;
    aarch64*)
        if [ x$ARCH = xarmv8 ]; then OK=1; fi
        if [ x$ARCH = xarmv7hf ]; then OK=1; fi
        ;;
    x86_64*)
        if [ x$ARCH = xx64 ]; then OK=1; fi 
        ;;
    i686*)
        if [ x$ARCH = xx86 ]; then OK=1; fi 
        ;;
esac

#
# Check for root privileges
#
if [ x$UID != x0 ]; then
    echo ""
    echo -e "${COL_RED}${COL_BLOLD}Error:${COL_RESET} This installer must be run with root privileges. Exiting."
    echo ""
    exit 2
fi

#
# Check for ffmpeg/avconv
#

if [ x$OK != x1 ]; then
    echo ""
    echo -e "${COL_RED}${COL_BLOLD}Error:${COL_RESET} This package is intended for $ARCH platforms. It is not compatible with your machine. Exiting."
    echo ""
    exit 3
fi

function confirm_n {
    while true; do
        read -p "$1 [y/N] " yn
        case $yn in
            [Yy]* ) 
                break 
                ;;
            "") 
                CLEAN_EXIT=1
                echo ""
                echo "Ok. Exiting."
                echo ""
                exit 4 
                ;;
            [Nn]* ) 
                CLEAN_EXIT=1
                echo ""
                echo "Ok. Exiting."
                echo ""
                exit 4 
                ;;
            * ) echo "Please answer yes or no.";;
        esac
    done
}

function confirm {
    while true; do
        read -p "$1 [Y/n] " yn
        case $yn in
            "") 
                break 
                ;;
            [Yy]* ) 
                break 
                ;;
            [Nn]* ) 
                CLEAN_EXIT=1
                echo ""
                echo "Ok. Exiting."
                echo ""
                exit 4 
                ;;
            * ) echo "Please answer yes or no.";;
        esac
    done
}

#
# Double-check with user that this is what they want
#
confirm "Do you want to install $PACKAGE_NAME on this machine?"

echo ""
echo "Downloading $PACKAGE_FILE to $TMPDIR/$PACKAGE_FILE"
echo ""
set +e
which wget >/dev/null; WHICH_WGET=$?
set -e
if [ $WHICH_WGET = 0 ]; then
    wget --show-progress -O "$TMPDIR/$PACKAGE_FILE" "$PACKAGE_URL"
else
    curl -L -# -o "$TMPDIR/$PACKAGE_FILE" "$PACKAGE_URL"
fi
    
echo ""
echo -n "Unpacking ${PACKAGE_FILE}..."
cd $TMPDIR
tar xf "$PACKAGE_FILE"
echo "Done"

if [ ! -d "$TMPDIR/$PACKAGE_NAME" ]; then 
    echo "Missing directory: $TMPDIR/$PACKAGE_NAME. This indicates a broken package."
    exit 5
fi

if [ ! -f "$TMPDIR/$PACKAGE_NAME/check.sh" ]; then 
    echo "Missing $TMPDIR/$PACKAGE_NAME/check.sh. This indicates a broken package."
    exit 5
fi

$TMPDIR/$PACKAGE_NAME/check.sh

if [ -e /opt/$PACKAGE_NAME ]; then
    hr
    echo ""
    echo -e "${COL_RED}${COL_BOLD}Warning:${COL_RESET} The /opt/$PACKAGE_NAME directory already exists."
    echo ""
    echo "This usually indicates that $PACKAGE_NAME was installed previously on this machine. The previous"
    echo "installation must be deleted before the installation can proceed."
    echo ""
    echo "Under normal circumstances, this directory does not contain any user data, so it should be safe to delete it."
    echo ""
    hr
    echo ""
    confirm "Delete /opt/$PACKAGE_NAME and re-install?"
    rm -Rf /opt/$PACKAGE_NAME
fi

echo ""
echo -n "Copying Files..."
mv "$TMPDIR/$PACKAGE_NAME" /opt
echo "Done"

# set up systemd 
HAS_SYSTEMCTL=1; which systemctl >/dev/null || HAS_SYSTEMCTL=0

if [ $HAS_SYSTEMCTL = 1 -a -d /etc/systemd/system ]; then
    SERVICE_FILE=/etc/systemd/system/${PACKAGE_NAME_LOWER}.service

    # stop in case it's running from an old install
    systemctl stop $PACKAGE_NAME_LOWER || true

    echo ""
    echo "Installing $SERVICE_FILE"

    cat > $SERVICE_FILE << END_SYSTEMD

[Unit]
Description=$PACKAGE_NAME
After=network-online.target

[Service]
Type=simple
User=root
Environment=ROON_DATAROOT=/var/roon
Environment=ROON_ID_DIR=/var/roon
ExecStart=/opt/$PACKAGE_NAME/start.sh
Restart=on-abort

[Install]
WantedBy=multi-user.target
END_SYSTEMD

    echo ""
    echo "Enabling service ${PACKAGE_NAME_LOWER}..."
    systemctl enable ${PACKAGE_NAME_LOWER}.service
    echo "Service Enabled"

    echo ""
    echo "Starting service ${PACKAGE_NAME_LOWER}..."
    systemctl start ${PACKAGE_NAME_LOWER}.service
    echo "Service Started"
else
    echo ""

    SERVICE_FILE=/etc/init.d/${PACKAGE_NAME_LOWER}

    /etc/init.d/$PACKAGE_NAME_LOWER stop || true

    cat > $SERVICE_FILE << END_LSB_INIT

#!/bin/sh

BEGIN INIT INFO

Provides: ${PACKAGE_NAME_LOWER}

Required-Start: $network

Required-Stop: $network

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Runs ${PACKAGE_NAME}

END INIT INFO

Defaults

DAEMON_NAME=“$PACKAGE_NAME”
DAEMON_EXECUTABLE=“/opt/$PACKAGE_NAME/start.sh”
DAEMON_OPTIONS=“”
DAEMON_HOMEDIR=“/opt/$PACKAGE_NAME”
DAEMON_PIDFILE=“/var/run/${PACKAGE_NAME_LOWER}.pid”
DAEMON_LOGFILE=“/var/log/${PACKAGE_NAME_LOWER}.log”
INIT_SLEEPTIME=“2”

export ROON_DATAROOT=/var/roon
export ROON_ID_DIR=/var/roon

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

if test -f /lib/lsb/init-functions; then
. /lib/lsb/init-functions
fi
if test -f /etc/init.d/functions; then
. /etc/init.d/functions
fi

DO NOT EDIT BELOW THIS POINT

is_running () {
# Test whether pid file exists or not
test -f $DAEMON_PIDFILE || return 1

# Test whether process is running or not
read PID < "\$DAEMON_PIDFILE"
ps -p \$PID >/dev/null 2>&1 || return 1

# Is running
return 0

}

root_only () {
if [ “$(id -u)” != “0” ]; then
echo “Only root should run this operation”
exit 1
fi
}

run () {
if is_running; then
PID=“$(cat $DAEMON_PIDFILE)”
echo “Daemon is already running as PID $PID”
return 1
fi

cd \$DAEMON_HOMEDIR

nohup \$DAEMON_EXECUTABLE \$DAEMON_OPTIONS >>\$DAEMON_LOGFILE 2>&1 &
echo \$! > \$DAEMON_PIDFILE
read PID < "\$DAEMON_PIDFILE"

sleep \$INIT_SLEEPTIME
if ! is_running; then
    echo "Daemon died immediately after starting. Please check your logs and configurations."
    return 1
fi

echo "Daemon is running as PID \$PID"
return 0

}

stop () {
if is_running; then
read PID < “$DAEMON_PIDFILE”
kill $PID
fi
sleep $INIT_SLEEPTIME
if is_running; then
while is_running; do
echo “waiting for daemon to die (PID $PID)”
sleep $INIT_SLEEPTIME
done
fi
rm -f “$DAEMON_PIDFILE”
return 0
}

case “$1” in
start)
root_only
log_daemon_msg “Starting $DAEMON_NAME”
run
log_end_msg $?
;;
stop)
root_only
log_daemon_msg “Stopping $DAEMON_NAME”
stop
log_end_msg $?
;;
restart)
root_only
$0 stop && $0 start
;;
status)
status_of_proc
-p “$DAEMON_PIDFILE”
“$DAEMON_EXECUTABLE”
“$DAEMON_NAME”
&& exit 0
|| exit $?
;;
*)
echo “Usage: $0 {start|stop|restart|status}”
exit 1
;;
esac
END_LSB_INIT

    echo "wrote out file"
    chmod +x ${SERVICE_FILE}

    HAS_UPDATE_RC_D=1; which update-rc.d >/dev/null || HAS_UPDATE_RC_D=0
    HAS_CHKCONFIG=1; which chkconfig >/dev/null || HAS_CHKCONFIG=0

    if [ $HAS_UPDATE_RC_D = 1 ]; then
        echo ""
        echo "Enabling service ${PACKAGE_NAME_LOWER} using update-rc.d..."
        update-rc.d ${PACKAGE_NAME_LOWER} defaults
        echo "Service Enabled"
    elif [ $HAS_CHKCONFIG = 1 ]; then
        echo ""
        echo "Enabling service ${PACKAGE_NAME_LOWER} using chkconfig..."
        chkconfig --add ${PACKAGE_NAME_LOWER}
        echo "Service Enabled"
    else
        echo "Couldn't find a way to enable the init script"
        exit 1
    fi

    echo ""
    echo "Starting service ${PACKAGE_NAME_LOWER}..."
    $SERVICE_FILE stop >/dev/null 2>&1 || true
    $SERVICE_FILE start
    echo "Service Started"

    echo "Setting up $PACKAGE_NAME to run at boot using LSB scripts"
fi

CLEAN_EXIT=1

echo ""
hr
echo ""
echo "All Done! $PACKAGE_NAME should be running on your machine now".
echo ""
hr
echo ""

}

function uninstall {
#
# Print banner/message
#
echo “”
hr
echo “”
echo -e “${COL_BOLD}Welcome to the $PACKAGE_NAME uninstaller${COL_RESET}”
echo “”
echo “This removes $PACKAGE_NAME from your machine by doing the following:”
echo “”
echo " - deleting all files in /opt/$PACKAGE_NAME"
echo " - removing $PACKAGE_NAME as a system service"
echo “”
echo “This uninstaller is only for systems that were installed using this installer script.”
echo “If you performed a custom install by hand, this is not for you.”
echo “”
echo " http://kb.roonlabs.com/LinuxInstall"
echo “”
hr
echo “”

#
# Check for linux (in case someone runs on OS X, Cygwin, BSD, etc)
#
case `uname -s` in 
    Linux)
        ;;
    *)
        echo -e "${COL_RED}${COL_BLOLD}Error:${COL_RESET} This package is intended for Linux platforms. It is not compatible with your machine. Exiting."
        ;;
esac

#
# Check for proper architecture
#
case "$MACHINE_ARCH" in
    armv7*)
        if [ x$ARCH = xarmv7hf ]; then OK=1; fi
        ;;
    aarch64*)
        if [ x$ARCH = xarmv8 ]; then OK=1; fi
        if [ x$ARCH = xarmv7hf ]; then OK=1; fi
        ;;
    x86_64*)
        if [ x$ARCH = xx64 ]; then OK=1; fi 
        ;;
    i686*)
        if [ x$ARCH = xx86 ]; then OK=1; fi 
        ;;
esac

#
# Check for root privileges
#
if [ x$UID != x0 ]; then
    echo ""
    echo -e "${COL_RED}${COL_BLOLD}Error:${COL_RESET} This installer must be run with root privileges. Exiting."
    echo ""
    exit 2
fi

if [ x$OK != x1 ]; then
    echo ""
    echo -e "${COL_RED}${COL_BLOLD}Error:${COL_RESET} This package is intended for $ARCH platforms. It is not compatible with your machine. Exiting."
    echo ""
    exit 3
fi

function confirm_n {
    while true; do
        read -p "$1 [y/N] " yn
        case $yn in
            [Yy]* ) 
                break 
                ;;
            "") 
                CLEAN_EXIT=1
                echo ""
                echo "Ok. Exiting."
                echo ""
                exit 4 
                ;;
            [Nn]* ) 
                CLEAN_EXIT=1
                echo ""
                echo "Ok. Exiting."
                echo ""
                exit 4 
                ;;
            * ) echo "Please answer yes or no.";;
        esac
    done
}

function confirm {
    while true; do
        read -p "$1 [Y/n] " yn
        case $yn in
            "") 
                break 
                ;;
            [Yy]* ) 
                break 
                ;;
            [Nn]* ) 
                CLEAN_EXIT=1
                echo ""
                echo "Ok. Exiting."
                echo ""
                exit 4 
                ;;
            * ) echo "Please answer yes or no.";;
        esac
    done
}

#
# Double-check with user that this is what they want
#
confirm_n "Are you sure that you want to uninstall $PACKAGE_NAME on this machine?"

# set up systemd 
HAS_SYSTEMCTL=1; which systemctl >/dev/null || HAS_SYSTEMCTL=0

if [ $HAS_SYSTEMCTL = 1 -a -d /etc/systemd/system ]; then
    SERVICE_FILE=/etc/systemd/system/${PACKAGE_NAME_LOWER}.service

    echo ""
    echo "Stopping service $PACKAGE_NAME_LOWER"
    systemctl stop $PACKAGE_NAME_LOWER || true
    echo "Service Stopped"

    echo ""
    echo "Disabling service ${PACKAGE_NAME_LOWER}..."
    systemctl disable ${PACKAGE_NAME_LOWER}.service || true
    echo "Service Disabled"

    echo ""
    echo "Removing service file $SERVICE_FILE"
    rm -f $SERVICE_FILE

else
    SERVICE_FILE=/etc/init.d/${PACKAGE_NAME_LOWER}

    echo ""
    echo "Stopping service ${PACKAGE_NAME_LOWER}..."
    $SERVICE_FILE stop >/dev/null 2>&1 || true
    echo "Service Stopped"

    echo ""
    echo "Removing service ${PACKAGE_NAME_LOWER}..."
    if [ $HAS_UPDATE_RC_D = 1 ]; then
        echo ""
        echo "Disabling service ${PACKAGE_NAME_LOWER} using update-rc.d..."
        update-rc.d ${PACKAGE_NAME_LOWER} remove
        echo "Service Disabled"
    elif [ $HAS_CHKCONFIG = 1 ]; then
        echo ""
        echo "Disabling service ${PACKAGE_NAME_LOWER} using chkconfig..."
        chkconfig --del ${PACKAGE_NAME_LOWER}
        echo "Service Disabled"
    else
        echo "Couldn't find a way to disable the init script"
        exit 0
    fi
    echo "Service Removed"

    echo ""
    echo "Removing service file $SERVICE_FILE"
    rm -f $SERVICE_FILE
fi

echo ""
echo -n "Deleting all files in /opt/$PACKAGE_NAME"
rm -Rf /opt/$PACKAGE_NAME

CLEAN_EXIT=1

echo ""
hr
echo ""
echo "All Done! $PACKAGE_NAME should be uninstalled."
echo ""
hr
echo ""

}

if [ x$1 == xuninstall ]; then
uninstall
else
install
fi

This is the content of the installer script when opening it in a text editor, not the result of executing the script. (A script is just program text that gets interpreted when it is executed, so if you open it with a text editor you just see the program text).

Did you make the script executable?

See the full instructions:

‘This is the content of the installer script when opening it in a text editor, not the result of executing the script.’ - I am aware of this but this is what I got after typing curl -O http://download.roonlabs.com/builds/roonserver-installer-linuxx64.sh in linux command line (terminal like prompt screen).
I think I very basic knowledge about linux or running code. I usually do installations like this by following instructions.
About your question ‘Did you make your script executable?’ do you mean if I added to 2nd line of code after the 1st line in the same command line?