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 | |
# | |
# chkconfig: - 55 45 | |
# description: The memcached daemon is a network memory cache service. | |
# processname: memcached | |
### END INIT INFO | |
# Usage: | |
# cp /etc/sysconfig/memcached /etc/sysconfig/memcached_server1 | |
# cp /etc/sysconfig/memcached /etc/sysconfig/memcached_server2 |
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 | |
# | |
# Copyright 2013 Rene Diepstraten | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 | |
# | |
# A simple remote side-by-side diff | |
# | |
# Author: Rene Diepstraten <[email protected]> | |
# | |
[[ $# -ne 2 ]] || [[ ! $1 =~ ":" ]] || [[ ! $2 =~ ":" ]] && { echo -e "\nUsage: $0 <host1>:<file> <host2>:<file>\n" >&2 ; exit 1; } | |
file1=${1##*:} ; host1=${1%%:*} ; file2=${2##*:} ; host2=${2%%:*} |
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
DPkg::Post-Invoke {"/usr/local/sbin/r1soft-installmodule"} |
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 | |
kernelversion=$(uname -r) | |
kernelminversion=${kernelversion%-*} | |
latestkernelversion=$(dpkg -l | awk '/linux-image-[0-9]/ {print $2}' | sort | tail -1 | grep -o '[0-9][0-9\.-]*[0-9]') | |
packages_to_remove=$(dpkg -l | awk '/linux-(image|headers)-[0-9]/ {print $2}' | egrep -v "${kernelminversion}|${latestkernelversion}") | |
[[ -z "${packages_to_remove}" ]] || dpkg -P ${packages_to_remove} |
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 | |
# Find the device with the default route | |
default_eth=$(ip r | awk '/default via/ {print $5}') | |
# Show the IP addresses for this device | |
ip a s ${default_eth} | awk '/global/ {print $2}' | cut -d'/' -f1 |
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
#!/usr/bin/python | |
# | |
# Author: Rene Diepstraten <[email protected]> | |
# | |
outputfile = "/var/dbcheck/dbcheck.txt" | |
import MySQLdb, signal, sys | |
def sigint_handler(signum, frame): |
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
[web01] | |
port=5141 | |
logfile=/var/log/web01.log |
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
#!/usr/bin/python | |
# | |
# Author: Rene Diepstraten <[email protected]> | |
# | |
send_items=[ | |
'wsrep_apply_oooe', | |
'wsrep_apply_oool', | |
'wsrep_apply_window', | |
'wsrep_causal_reads', |
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
#!/usr/bin/python | |
import socket | |
import subprocess | |
import sys | |
import tempfile | |
import urllib2 | |
url='http://127.0.0.1/server-status?auto' | |
zabbixhost='zabbix' |
OlderNewer