This file contains 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 | |
# Dennis Ullrich | |
# Version 0.1-0 (2017-06-29) | |
# [email protected] | |
# Bash Version 3 required (it also works with ksh) | |
[[ ${BASH_VERSINFO[0]} -lt 3 ]] && exit 1 | |
# Defaults | |
stdin=0 |
This file contains 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/ksh | |
# Dennis Ullrich | |
# Version 1.0-0 (2017-07-01) | |
# [email protected] | |
csv2ascii(){ | |
if [[ $# -ne 2 ]]; then | |
echo "$0 [separator] [file or \"-\" for stdin]" | |
return false | |
fi |
This file contains 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 | |
# Dennis Ullrich | |
# Version 0.1-0 (2017-07-02) | |
# [email protected] | |
if [ "$1" = "-v" ]; then | |
set -x | |
shift | |
fi |
This file contains 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 | |
# Dennis Ullrich | |
# [email protected] | |
# 2017-06-17 | |
# Unset readonly variable in bash | |
# ITS JUST A PROOF OF CONCEPT! DONT USE THIS FOR REAL, ITS NASTY!!! | |
readonly testvar="Bla bla" | |
unset testvar |
This file contains 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 | |
# Dennis Ullrich | |
# [email protected] | |
# 2017-10-03 | |
# Insert the following to your .bashrc and execute "source ~/.bashrc" | |
# It is for servers with no connection to a repository as a short workaround | |
if ! type lsscsi >/dev/null 2>&1; then | |
lsscsi() { |
This file contains 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 | |
# Dennis U. | |
# [email protected] | |
# | |
# Script to shutdown local machine when a remote host is not available | |
# Check out the exception_present function! | |
# | |
# V 0.1 Initial release | |
# V 0.2 Added support for exceptions |
This file contains 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 | |
if [[ $# -ne 1 ]]; then | |
echo "$0 [path to sysstat file made with: \"LANG=POSIX LC_ALL=C sar -Adp\"]" | |
exit 1 | |
fi | |
_FILE = "$1" | |
# Der Parser von ksar mag bestimmte sachen nicht und beendet sich dann mit einer exception |
This file contains 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 | |
# Dennis Ullrich | |
# [email protected] | |
#################################### | |
############# Variables ########## | |
################################ | |
# Arrays | |
declare -A interface |
This file contains 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 | |
# Dennis Ullrich | |
# | |
# Lists upgradable packages comma separated on systems with apt package management (hopefully) | |
# Made for "Linux Helpdesk Deutschland - Hilfe für Linux Einsteiger" group | |
# | |
# 2018-09-14 v0.1: First release | |
# 2018-09-14 v0.2: Improved code... No read, while loops etc... Everything is processed with bash internals. | |
get_upgradable_packages() { |
This file contains 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 | |
##### | |
# | |
# Author: Dennis Ullrich ([email protected]) | |
# | |
# Description: | |
# Checks server uptime on linux machines and raises critical if uptime <= 5 minutes. | |
# Made for icinga2 - parameters are not implemented yet. | |
# |
OlderNewer