77 lines
1.6 KiB
Bash
77 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# shellcheck disable=SC1091
|
|
source "${ROOTDIR}/scripts/binkd_vars.sh"
|
|
source "${ROOTDIR}/scripts/helpers/git.sh"
|
|
|
|
function binkd_build() {
|
|
local configure_params=$*
|
|
|
|
echo "* Starting building binkd..."
|
|
echo "* Additional configure parameters: ${configure_params}"
|
|
|
|
git_source "binkd" "${_BINKD_GIT}"
|
|
|
|
if ! cd "${_BINKD_SOURCE_DIR}"; then
|
|
echo "! Failed to change directory to '${_BINKD_SOURCE_DIR}'!"
|
|
exit 1
|
|
fi
|
|
|
|
cp mkfls/unix/* .
|
|
|
|
# shellcheck disable=SC2086
|
|
if ! ./configure ${_BINKD_CONFIGURE_PARAMS}; then
|
|
echo "! Failed to configure binkd sources!"
|
|
exit 1
|
|
fi
|
|
|
|
if ! make; then
|
|
echo "! Failed to compile binkd!"
|
|
exit 1
|
|
fi
|
|
|
|
if ! make install; then
|
|
echo "! Failed to install binkd!"
|
|
exit 1
|
|
fi
|
|
|
|
echo "* binkd installed."
|
|
}
|
|
|
|
function binkd_configure() {
|
|
echo "* Configuring binkd..."
|
|
|
|
mkdir -p "${_DATA_ROOT}"/{localinb,logs,protinb,tempinb}
|
|
|
|
cat >"${_BINKD_CONFIG_FILE}" <<EOF
|
|
domain fidonet ${_DATA_ROOT}/outbound 2
|
|
address ${FTN_ADDR}@fidonet
|
|
sysname "${MACHINE_NAME}"
|
|
location "${LOCATION}"
|
|
sysop "${REAL_NAME}"
|
|
nodeinfo 1M,TCP,BINKP
|
|
call-delay 20
|
|
rescan-delay 5
|
|
try 1
|
|
hold 5
|
|
send-if-pwd
|
|
log ${_DATA_ROOT}/logs/binkd.log
|
|
loglevel 4
|
|
conlog 4
|
|
percents
|
|
printq
|
|
inbound ${_DATA_ROOT}/localinb
|
|
inbound-nonsecure ${_DATA_ROOT}/protinb
|
|
temp-inbound ${_DATA_ROOT}/tempinb
|
|
minfree 2048
|
|
minfree-nonsecure 2048
|
|
kill-dup-partial-files
|
|
kill-old-partial-files 86400
|
|
kill-old-bsy 43200
|
|
prescan
|
|
node ${UPLINK_FTN} ${UPLINK_ADDR} ${PASSWORD}
|
|
EOF
|
|
|
|
echo "* binkd configured."
|
|
}
|