This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ETHTOOL=/sbin/ethtool | |
NETWORK_INTERFACE=eth0 | |
ERROR_STATS=$($ETHTOOL -S $NETWORK_INTERFACE | grep errors | tr -d " ") | |
for STAT in $ERROR_STATS | |
do | |
KEY=$(echo $STAT | awk -F ':' '{print $1}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MONIT_VERSION=5.25.3 | |
cd /tmp | |
sudo groupadd monit | |
sudo useradd monit -g monit | |
wget https://mmonit.com/monit/dist/binary/${MONIT_VERSION}/monit-${MONIT_VERSION}-linux-x64.tar.gz -O monit.tar.gz | |
echo "Untarring the archive" | |
tar xzvf monit.tar.gz | |
sudo cp -R monit-${MONIT_VERSION}/bin/monit /usr/local/bin/monit | |
sudo mkdir /etc/monit/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Check and stop unallowed file names from being checked in | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=$(git hash-object -t tree /dev/null) | |
fi |
OlderNewer