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/sh | |
# Run it into backup directory. | |
# export file format : base-table....sql.gz | |
for FILE in $(ls -1 *.sql.gz) ; do | |
DATABASE=$(echo $FILE | cut -d\- -f1) | |
TABLE=$(echo $FILE | cut -d\- -f2 | cut -d\. -f1) | |
PS=$(mysql -e 'show processlist\G' | grep ^Command | wc -l) | |
while [ $PS -gt 100 ]; do |
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 | |
# You should be strict ! ( -e ) | |
# Or want some debug ? ( -x ) | |
set -e | |
# NOTES | |
# | mail -s "AWH host check for $HOSTNAME @ $(date +%Y.%m.%d-%H:%M)" [email protected] | |
### |
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
#!/usr/bin/env sh | |
for zone in $(cat /etc/bind/named.conf.local | grep -v ^/ | grep -v ^$| cut -d\" -f2 | sort |uniq ); do | |
echo "* dig NS $zone" | |
dig NS +short $zone | |
done |
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
#!/usr/bin/env sh | |
#charger le module | |
modprobe nbd max_part=63 | |
# connecter le systeme a l'image (nbd0 a nbd15 dispo ) | |
qemu-nbd -c /dev/nbd0 image.qcow2 | |
# monter la partition | |
mount /dev/nbd0p1 /mnt/image |
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
#!/usr/bin/env sh | |
PATH="/etc/apache2/sites-available" | |
if [ "$#" -gt "0" ]; then | |
for VHOST in $@; do | |
if [ -f "$PATH/$VHOST" ]; then | |
/bin/rm "$PATH/$VHOST"; | |
fi | |
/bin/cp "$PATH/default" "$PATH/$VHOST" |
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
#!/usr/bin/env sh | |
if [ ! -f "$1" ]; then | |
echo "Usage $0 : filename to paste" | |
exit 1 | |
fi | |
COUNTER=0 | |
while read LINE |
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
#!/usr/bin/env sh | |
FTP_HOST='ftpback-rbx4-105.ovh.net' | |
ZFS_POOL='zroot' | |
GPG_USERID='0xA8331351' | |
for DIR in $(df -t zfs | awk '/\// {print $6}'); do | |
DIR_NAME=$(echo $DIR | sed 's#^/$#slash#' | sed 's#/##'| sed 's#/#_#g') | |
zfs set snapdir=visible $ZFS_POOL$DIR | |
if [ -d "$DIR/.zfs/snapshot/daily.0" ]; then |
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
background yes | |
update_interval 1 | |
cpu_avg_samples 2 | |
net_avg_samples 2 | |
temperature_unit celsius | |
double_buffer yes | |
no_buffers yes | |
text_buffer_size 2048 |
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
Package: libapache2-mod-php5 libapache2-mod-php5filter | |
Pin: version 5.2* | |
Pin-Priority: 1001 | |
Package: php5-suhosin | |
Pin: version 0.9.2* | |
Pin-Priority: 1001 | |
Package: php5 php5-cgi php5-cli php5-common php5-curl php5-dbg php5-dev php5-enchant php5-gd php5-gmp php5-ming php5-xcache | |
Pin: version 5.2* |
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
#!/usr/bin/env sh | |
# === CONFIG === | |
MYCNF='/etc/mysql/debian.cnf' | |
BIN_DEPS='bzip2 mysql' | |
# === CHECKS === | |
for BIN in $BIN_DEPS; do | |
which $BIN 1>/dev/null 2>&1 |
OlderNewer