Uninstalling
This page tells you how to remove Centova Cast from a server with the uninstaller, sbin/uninstall.
WARNING: The uninstaller permanently deletes all of the data of Centova Cast: the accounts, the media files of the clients, the logs, the metrics, the configuration and the certificates. You cannot undo it. Make backups of the data that you want to keep before you start.
Procedure
To remove Centova Cast:
- Log in to the server as
root. Type this command:
~~~ {.bash} /usr/local/centovacast/sbin/uninstall --i-want-to-delete-all-my-data ~~~
The uninstaller asks for a final confirmation. Type
UNINSTALLin capital letters, then press Enter.
If you type a different word, the uninstaller shows Aborted. and changes nothing.
If you installed Centova Cast in a different directory with the --base-path option of the installer, use the
sbin/uninstall command in that directory. The uninstaller removes the directory that /etc/centovacast.conf
names. If that file does not exist or names no directory, it removes /usr/local/centovacast.
Options
--i-want-to-delete-all-my-data
Confirms that you want to delete all of the data. This option is required. Without it, the uninstaller shows its help text and stops.--no-firewall
Does not remove the firewall rules of Centova Cast. Use this option if you configured the firewall yourself and want to keep the rules.--help,-h
Shows the help text.
What the Uninstaller Does
After the confirmation, the uninstaller does these steps:
- It stops the Centova Cast services.
- It stops all processes with the names
sc_serv,icecast,icecast2,ices,liquidsoapandsource. - It removes the Centova Cast services from systemd (or from the init scripts on a server without systemd), and
removes the scheduled job
/etc/cron.d/centovacast-v4. - If the client data directory
var/vhostsis a separate mount, it deletes the client data, unmounts the directory, and removes its line from/etc/fstab. - It removes the firewall rules of Centova Cast, unless you gave
--no-firewall. For more information, see the Firewall Rules section. - It deletes the installation directory.
- It removes the
CASTPATHline from/etc/centovacast.conf. If the file then contains nothing more, it deletes the file. - It deletes the system users
centovacast,ccuserandccui, and the system groupccsock.
When the uninstaller is complete, it shows Complete.
Note that step 2 stops the processes with these names on the whole server, also processes that do not belong to Centova Cast. If you run other streaming servers on the same server, start them again after the uninstallation.
Note that the uninstaller does not change a Centova Cast v3 installation on the same server. It removes only its own
line from /etc/centovacast.conf, which Centova Cast v3 also uses.
The uninstaller does not remove the streaming software that the package installer installed with the package manager
of the operating system (for example the Debian package icecast2), and does not remove FFmpeg.
Firewall Rules
The uninstaller removes the rules for these TCP ports:
- 2197, 2199 (the control panel), 2121 (FTP) and 2222 (SFTP).
- 80 and 443, if the control panel uses these ports.
- 8000-10000 (the streams).
The method depends on the firewall of the server:
firewalld
The uninstaller removes the ports from the permanent configuration, and reloads the firewall.nftables
The uninstaller removes the ports from the nftables configuration file, makes sure that the new file is valid, and loads it. It removes a rule that has no more ports.iptables
The installer does not add iptables rules, so the uninstaller does not remove any. If one of the ports is open in the iptables rules, the uninstaller shows the ports under the heading Manual Firewall Cleanup. If you added these rules yourself, remove them yourself.
If the uninstaller cannot change the firewall configuration, it shows a warning and continues.
CAUTION: If other software on the server uses one of these ports, give the --no-firewall option. Then remove the
rules that you do not need yourself. The uninstaller cannot know which rules other software needs.