First of all, make sure to refer and understand the general instructions in the official AirDC++ site:
https://airdcpp-web.github.io/docs/installation/compiling.html
What you'll find here are the specific instructions to compile airdcppd in a FreeBSD system, or in a FreeNAS jail.
This was originally tested in a FreeNAS-11.3-U4.1, which uses FreeBSD 11.3-RELEASE-p11 as base system. I don't know if it will work on previous or newer versions, but I intend to keep this document updated.
# pkg update
# pkg upgrade
# pkg install git cmake libmaxminddb miniupnpc pkgconf libnatpmp leveldb websocketpp boost-all python npm-node12
NOTE about npm
There are currently some versions of npm available to install:
- npm-6.12.1_1
- npm-node10-6.12.1_1
- npm-node12-6.12.1_1
The first time I installed the default npm package, I received a warning about that npm doesn't support Node.js version 14. Then I removed this version and installed npm-node12, and then I received a warning about that this version uses a deprecated version of python (2.7?)... Between the 2 warnings I decided to go on with npm-node12. Feel free to test other options. Your mileage may vary.
# git clone https://github.com/airdcpp-web/airdcpp-webclient.git
# cd airdcpp-webclient
# cmake .
# make -j2
If everything ran fine, you'll find the airdcppd binary in the airdcppd folder. So:
# make install
Here is my script:
#!/bin/sh
#
# PROVIDE: airdcppd
# REQUIRE: networking
# KEYWORD:
. /etc/rc.subr
name="airdcppd"
rcvar="${name}_enable"
load_rc_config ${name}
: ${airdcppd_enable:="NO"}
: ${airdcppd_user:="root"}
: ${airdcppd_group:="root"}
pidfile="/var/run/airdcppd/airdcppd.pid"
command="/usr/local/bin/airdcppd"
command_args="-d -c=/home/plex/.airdc++ -p=/var/run/airdcppd/airdcppd.pid"
run_rc_command "$1"
Save it under the name airdcppd and copy to /usr/local/etc/rc.d with 755 permissions.
pw group add plex -g 118
pw user add plex -u 111
pw user mod -m /home/plex
# mkdir /var/run/airdcppd
# chown plex:plex /var/run/airdcppd
# sysrc airdcpdd_enable=YES
# sysrc airdcpdd_user=plex
# sysrc airdcpdd_group=plex
At this point you should be able to control the service:
# service airdcppd start | stop | status | restart
And finally, decide and configure the folder you'll want to share and to download the files.
Feel free to point out any mistakes I made, including mispellings, typos and grammar errors.
Happy AirDC++ing.