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
This commit is contained in:
Jonathan Price 2017-04-18 02:14:23 +01:00 committed by Tony Murray
parent 0b2f5cddd2
commit 2186e3b79a
12 changed files with 15 additions and 14 deletions

View File

@ -197,6 +197,7 @@ LibreNMS contributors:
- Jari Schäfer <jari.schaefer@gmail.com> (jarischaefer)
- Jan-Philipp Litza <janphilipp@litza.de> (jplitza)
- Chris Putnam <chrisputnam@gmail.com> (putnam)
- Jonathan Price <jonathan@jonathanprice.uk> (Pricetx)
- Remy de Boer <remy@slowpoke.nl> (remydb)
- Ben Klang <ben@alkaloid.net> (bklang)

View File

@ -113,7 +113,7 @@ main () {
# only try to su if we are root (or sudo)
if [[ "$EUID" -eq 0 ]]; then
echo "Re-running ${DAILY_SCRIPT} as ${LIBRENMS_USER} user"
su -l "$LIBRENMS_USER" -c "$DAILY_SCRIPT $@"
sudo -u "$LIBRENMS_USER" "$DAILY_SCRIPT" "$@"
exit;
fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
sub getfiles {

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################
@ -50,4 +50,4 @@ while read line;
done < $NODELIST
# This line SSHs to LibreNMS server and runs the destwork script to finish conversion
ssh root@$DEST 'bash -s' < $DESTSCRIPT
ssh root@$DEST 'bash -s' < $DESTSCRIPT

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################
@ -23,4 +23,4 @@ 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
done < $NODELIST

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Observium to LibreNMS conversion
####################### SCRIPT DESCRIPTION ########################
@ -23,4 +23,4 @@ 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
done < $NODELIST

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
############################################################
# copy this file somewhere like /opt and chmod +x it #
# edit your snmpd.conf and add the below line and restart: #

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
GH_REPO="@github.com/librenms-docs/librenms-docs.github.io.git"
FULL_REPO="https://${GH_TOKEN}$GH_REPO"
THEME_REPO="https://github.com/librenms-docs/librenms_theme.git"

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#
# Daemon used to watch the maillog messages for certain messages and trigger events when
# certain messages occur