Jonathan Price 2186e3b79a fix: Update Shebangs and daily.sh for FreeBSD compatibility (#6413)
* Where shebangs had no flags, updated them to use /usr/bin/env for cross-platform compatibility
Updated daily.sh to support FreeBSD (su has different args, replaced with sudo when not on linux)

* Added myself to AUTHORD.md as per contributor guidelines

* Set all platforms to use sudo rather than su
Re-added missing arguments to sudo
2017-04-17 20:14:23 -05:00

27 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################
# A simple script to create needed directories on LibreNMS server #
###################################################################
########################### DIRECTIONS ############################
# Enter values for NODELIST, L_RRDPATH. The default should work if#
# you put the files in the same location. #
###################################################################
############################# CREDITS #############################
# LibreNMS work is done by a great group - http://librenms.org #
# Script Written by - Dan Brown - http://vlan50.com #
###################################################################
# Enter path to node list text file
NODELIST=/tmp/nodelist.txt
# Enter path to LibreNMS RRD directories
L_RRDPATH=/opt/librenms/rrd/
# This loop enters the RRD folder and creates dir based on contents of node list text file
while read line
do mkdir -p $L_RRDPATH"${line%/*}"
done < $NODELIST