Instalação e configuração ad-icecast Ubuntu 18

it is wise idea to *purge* any existing icecast installs before to ensure a clean setup (apt-get remove --purge ...)

#check if is UTC
date

#edit repo
sudo vi /etc/apt/sources.list

#include the next line at the sources.list ends
## Nextdial
deb http://icecast-nextdial.lf-projects.net/debrepo/ubuntu/ bionic main

#import the key before usage
sudo wget -qO - http://icecast-nextdial.lf-projects.net/debrepo/ubuntu/dists/bionic/KEY.gpg | sudo apt-key add -

#update sources
sudo apt-get update

#install icecast and press "no" to any config screen during this process
sudo apt-get install -y icecast2-lf

#install letsencrypt
sudo apt-get install -y certbot

#generate the ssl key
sudo certbot certonly --standalone -d {sub.dominio.com.br}

#create the pem for icecast
sudo cat /etc/letsencrypt/live/{sub.dominio.com.br}/privkey.pem /etc/letsencrypt/live/{sub.dominio.com.br}/fullchain.pem | sudo tee /etc/icecast2/{sub.dominio.pem}

#create log dir
sudo mkdir /var/log/icecast2/{sub.dominio}

#create xml as provided by Nextdial
sudo vi /etc/icecast2/{sub.dominio.xml}

#set the ownership
sudo chown -R icecast2:icecast /var/log/icecast2/{sub.dominio}/
sudo chown -R icecast2:icecast /etc/icecast2/{sub.dominio.xml}
sudo chown -R icecast2:icecast /etc/icecast2/{sub.dominio.pem}

#start server
sudo icecast2 -b -c /etc/icecast2/{sub.dominio.xml}

#close dialog
press cmd+c or ctr+c