代码拉取完成,页面将自动刷新
同步操作将从 学习写代码/adsb-scripts 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
systemctl stop adsbexchange-978
cat >/usr/bin/adsbx-978-start <<"EOF"
#!/bin/bash
if [ -f "/boot/adsb-config.txt" ]; then
. /boot/adsb-config.txt
. /boot/adsbx-978env
else
echo "NETCAT ERR: Configuration file does not exist."
exit 1
fi
# this script is started by adsbexchange-978.service
if [[ "${DUMP978}" == "yes" ]]; then
echo "dump978 enabled"
sudo systemctl enable --now dump978-fa.service
sudo systemctl enable --now adsbexchange-978-convert.service
sudo systemctl enable --now tar1090-978.service
/usr/bin/adsbx-978 --net-only \
$RECEIVER_978_OPTIONS $DECODER_978_OPTIONS $NET_978_OPTIONS $JSON_978_OPTIONS \
--lat ${LATITUDE} --lon ${LONGITUDE} \
--net-ri-port $AVR_978_IN_PORT \
--write-json /run/adsbexchange-978 --quiet
#/usr/local/share/adsb-exchange-978/readsb \
# $RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS --net-ri-port $AVR_IN_PORT \
# --write-json /run/adsb-exchange-978 --quiet
else
sudo systemctl disable --now dump978-fa.service
sudo systemctl disable --now adsbexchange-978-convert.service
sudo systemctl disable --now tar1090-978.service
exit 0
fi
EOF
chmod a+x /usr/bin/adsbx-978-start
systemctl restart adsbexchange-978
if [[ -f /etc/default/dump978-fa ]]; then
sed -i -e 's/RECEIVER_OPTIONS.*/RECEIVER_OPTIONS="--sdr-gain 43.9 --sdr driver=rtlsdr,serial=978 --format CS8"/' /etc/default/dump978-fa
systemctl restart dump978-fa
fi
echo service override done!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。