Fix typo in RTLSDR-OGN graph generation

pull/334/head
romeo-golf 2017-01-08 05:09:23 +00:00
rodzic 2d8570a636
commit a19f092816
1 zmienionych plików z 10 dodań i 9 usunięć

Wyświetl plik

@ -58,7 +58,7 @@ if [[ -z "${DUMP1090_INSTALLED}" ]] || [[ -z "${DUMP1090_FORK}" ]] ; then
DUMP1090_INSTALLED="true"
fi
fi
if [ -f /etc/init.d/rtlsdr-ogn ]; then
if [[ -f /etc/init.d/rtlsdr-ogn ]] ; then
RTLSDROGN_INSTALLED="true"
fi
@ -74,7 +74,7 @@ fi
## MODIFY THE DUMP1090-MUTABILITY INIT SCRIPT TO MEASURE AND RETAIN NOISE DATA
if [[ ${DUMP1090_INSTALLED} = "true" ]] && [[ ${DUMP1090_FORK} = "mutability" ]] ; then
if [[ "${DUMP1090_INSTALLED}" = "true" ]] && [[ "${DUMP1090_FORK}" = "mutability" ]] ; then
echo -e "\e[94m Modifying the dump1090-mutability init script to add noise measurements...\e[97m"
sudo sed -i 's/ARGS=""/ARGS="--measure-noise "/g' /etc/init.d/dump1090-mutability 2>&1
echo -e "\e[94m Reloading the systemd manager configuration...\e[97m"
@ -118,7 +118,7 @@ WriteThreads 1
EOF
# Dump1090 specific values.
if [[ ${DUMP1090_INSTALLED} = "true" ]] ; then
if [[ "${DUMP1090_INSTALLED}" = "true" ]] ; then
sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
#----------------------------------------------------------------------------#
# Added types for dump1090. #
@ -191,7 +191,7 @@ LoadPlugin curl
EOF
# Raspberry Pi specific values.
if [[ ${HARDWARE} == "RPI" ]] ; then
if [[ "${HARDWARE}" = "RPI" ]] ; then
sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
<Plugin table>
<Table "/sys/class/thermal/thermal_zone0/temp">
@ -212,7 +212,7 @@ if [[ ${HARDWARE} == "RPI" ]] ; then
EOF
# CHIP specific values.
elif [[ ${HARDWARE} == "CHIP" ]] ; then
elif [[ "${HARDWARE}" = "CHIP" ]] ; then
sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
<Plugin table>
<Table "/sys/class/hwmon/hwmon0/temp1_input">
@ -235,7 +235,7 @@ EOF
fi
# Dump1090 specific values.
if [[ ${DUMP1090_INSTALLED} = "true" ]] ; then
if [[ "${DUMP1090_INSTALLED}" = "true" ]] ; then
sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
#----------------------------------------------------------------------------#
# Configure the dump1090 python module. #
@ -259,7 +259,7 @@ EOF
fi
# RTLSDR-OGN specific values.
if [[ ${RTLSDROGN_INSTALLED} = "true" ]] ; then
if [[ "${RTLSDROGN_INSTALLED}" = "true" ]] ; then
sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
#----------------------------------------------------------------------------#
# RTLSDR-OGN Graphs #
@ -312,6 +312,7 @@ if [[ ${RTLSDROGN_INSTALLED} = "true" ]] ; then
</Page>
</Plugin>
EOF
fi
# Remaining config for all installations.
sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
@ -344,12 +345,12 @@ chmod +x ${PORTALBUILDDIRECTORY}/graphs/make-collectd-graphs.sh 2>&1
# The next block is temporary in order to insure this file is
# deleted on older installation before the project renaming.
if [ -f /etc/cron.d/adsb-feeder-performance-graphs ]; then
if [[ -f /etc/cron.d/adsb-feeder-performance-graphs ]] ; then
echo -e "\e[94m Removing outdated performance graphs cron file...\e[97m"
sudo rm -f /etc/cron.d/adsb-feeder-performance-graphs 2>&1
fi
if [ -f ${COLLECTD_CRON_FILE} ]; then
if [[ -f ${COLLECTD_CRON_FILE} ]] ; then
echo -e "\e[94m Removing previously installed performance graphs cron file...\e[97m"
sudo rm -f ${COLLECTD_CRON_FILE} 2>&1
fi