View check_http_many.sh
#!/bin/bash
result=/tmp/nagios.check_http_many.result
trap "rm ${result}*" EXIT
warning=false
critical=false
check_state() {
if [[ $1 -eq 0 ]]; then
View POSTSuspect.sh
grep -Eo '"POST .*.php' access.log | grep -ve cron -e login -e admin -e xmlrpc -e trackback -e comment -e 404 | sort -u
View gist:ee2274d6dbf1d692c288
grep '"POST ' access.log | grep -ve cron -e login -e admin -e xmlrpc -e trackback -e comment -e 404
View repairmysql.sh
#!/bin/bash
tables=$(grep crashed /var/log/syslog | grep -Eo \'\./.*\' --color=auto | sed s#\'./## | sed s#\'## | uniq | tr -s '\n' ' ')
for tableC in $tables; do
db=${tableC%/*}
table=${tableC#*/}
mysqlcheck --auto-repair --check $db $table
done
View addmailsvmail.sh
#!/bin/bash
regex="(.*);(.*);(.*)"
#regex2=";([^\"]+)"
lastuidNumber=2024
while read line; do
[[ $line =~ $regex ]]
# Get name
name=${BASH_REMATCH[2]}
# Get uid
View dhclient.sh
#!/bin/bash
# Relaunch dhclient when it crash...
mailaddr="jdoe@example.Com"
IPv6=true
pgrep -f dhclient6 > /dev/null
status=$?
if [[ $status != 0 ]]; then
IPv6=false
View bridge-fbx6hd
# brctl addbr br0
# brctl adif br0 eth0
# brctl adif br0 eth1
# ifconfig br0 up
# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.0000aa002005 no eth0
eth1
View aacskeys
$ aacskeys -va /media/bd
aacskeys 0.4.0e by arnezami, KenD00, Key, Nobu1789
Current path: /usr/share/aacskeys
MKBv: 12
Device key: 810827A76E5B2CC1685E3217A23E2186
Processing key: 973940BB180E83266231EE596CEF65B2
Encrypted C-value: 3F68BC4C168C01CDF97C55D08B5BE16C
Corresponding uv: 00000080
View es_backup.sh
# Yout need to register a repository.
# This action need to be only done one time.
# $ curl -XPUT 'http://localhost:9200/_snapshot/backup' -d '{
# "type": "fs",
# "settings": {
# "location": "/home/backup/elasticsearch",
# "compress": true
# }
# }'
View gr.sh
for group in $(grep user1 /etc/group | cut -d':' -f1 | sed '/user1/d'); do adduser user2 $group; done