Skip to content

Commit

Permalink
Improve SNMP import
Browse files Browse the repository at this point in the history
  • Loading branch information
trick77 committed Dec 31, 2023
1 parent 27becfa commit 05a8b4e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions observium/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ import_snmp_devices() {
devices_file="/conf/snmp-devices.txt"
if [ -e "${devices_file}" ]; then
echo "Trying to import SNMP devices from ${devices_file}..."
while read -r params || [ -n "$params" ]; do
php ./add_device.php ${params} || true
done < <(grep -v "^#\|^$" "${devices_file}")
php ./add_device.php "${devices_file}" || true
echo "Done importing SNMP devices!"
else
echo "Not importing any SNMP devices, file ${devices_file} does not exist!"
Expand Down

0 comments on commit 05a8b4e

Please sign in to comment.