====== Installing FreeSwitch under Devuan ====== [[https://freeswitch.org|FreeSwitch]] is a PBX system similar to [[https://www.asterisk.org/|Asterisk]], and can be installed using the package manager under CentOS, RHEL, Fedora, Debian and Ubuntu. However, version 1.10 has a dependency on [[http://suckless.org/sucks/systemd/|systemd]], which if you are running [[http://devuan.org|Devuan]], you won't have (and won't want) on your machine. It seems that the dependency is pointless, because: - the only link with systemd is the startup scripts, nothing to do with libraries etc. - the mechanism to create the sysvinit scripts is still in the 1.10 source code However, a **dependency** means that without systemd, you cannot install FreeSwitch. There are ways round this (not including "install systemd") :) The simplest method uses the [[https://manpages.debian.org/testing/equivs/equivs-build.1.en.html|equivs]] utility, which allows you to build a "package" which doesn't actually __do__ anything, but: * makes your package manager think the real package is installed * can have dependencies, causing other things you might want, to be installed automatically * can have conflicts, causing other things you don't want, to be removed automatically At first I thought "I'll make a package called systemd and install that". However this introduced its own problems - on a Devuan machine, several things object to finding systemd installed (no real surprise there, of course), so they conflict with it if you try to install it, or a dummy package of that name. __Reading the error message__ (often a good idea, often overlooked) generated by **aptitude install freeswitch-meta-all** proved useful. It was:freeswitch-systemd : Depends: systemd which is a virtual package and is not provided by any available package So, building a dummy package called **freeswitch-systemd** and installing that was a much simpler way around the problem. If you examine the (real) package freeswitch-systemd, you find that it "provides freeswitch-init", so building __this__ as a dummy package and installing it is an alternative way of dealing with the problem. - **aptitude install equivs** - **equivs-control freeswitch-init** - edit the text file which has just been generated for you named **freeswitch-init** to contain the following uncommented lines (you can leave the other comments in if you wish):Section: misc Priority: optional Standards-Version: 3.9.2 Package: freeswitch-init Description: something to stop systemd being a dependency - **equivs-build freeswitch-init** - **dpkg -i freeswitch-init_1.0_all.deb** - **aptitude install freeswitch-meta-all** (as per the standard Debian FreeSwitch [[https://freeswitch.org/confluence/display/FREESWITCH/Debian+10+Buster|documentation]]) Success :) To get the sysvinit script for the newly-installed application, go to http://files.freeswitch.org/freeswitch-releases/ and download your preferred archive of the version you just installed and unpack it. Then search for the file **freeswitch-sysvinit.freeswitch.init** and copy it to the correct name and location, and make it executable:# wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.6.-release.tar.bz2 # tar -xf freeswitch-1.10.6.-release.tar.bz2 # find freeswitch-1.10.6.-release -name freeswitch-sysvinit.freeswitch.init # cp -a freeswitch-1.10.6.-release/debian/freeswitch-sysvinit.freeswitch.init /etc/init.d/freeswitch # chmod +x /etc/init.d/freeswitch To enable FreeSwitch to auto-start at boot time: * **update-rc.d freeswitch defaults** # /etc/init.d/freeswitch start 21602 Backgrounding. FreeSWITCH[21601] Waiting for background process pid:21602 to be ready..... FreeSWITCH[21601] Waiting for background process pid:21602 to be ready..... FreeSWITCH[21601] System Ready pid:21602 # /etc/init.d/freeswitch status [ ok ] freeswitch is running. # fs_cli Type /help to see a list of commands +OK log level [7] freeswitch@devuan> status UP 0 years, 0 days, 0 hours, 4 minutes, 54 seconds, 216 milliseconds, 852 microseconds FreeSWITCH (Version 1.10.6 -release-18-1ff9d0a60e 64bit) is ready 0 session(s) since startup 0 session(s) - peak 0, last 5min 0 0 session(s) per Sec out of max 30, peak 0, last 5min 0 1000 session(s) max min idle cpu 0.00/99.60 Current Stack Size/Max 240K/8192K More success, and proving how much (not at all) FreeSwitch actually needs systemd :) PS: When you get confused about how to get out of this thing you just started, and find that **exit** and **quit** both tell you "Command not found!", try **/exit**, **/quit** or **/bye**. Meh. ---- [[.:|Go up]]\\ Return to [[:|main index]].