Skip to content

Instantly share code, notes, and snippets.

View malias's full-sized avatar

malias

View GitHub Profile
@malias
malias / FindBigFiles_beta_lb.sh
Created August 6, 2014 19:51
Find Big Files with LSBInitScripts and exceptions
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: findbigfiles
# Required-Start: $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4
# Default-Stop: 0 S 6
# Short-Description: Search big Files
# Description: Search all big files in specific directories
@malias
malias / mysqltablecheck_beta_lb.sh
Last active August 29, 2015 14:04
Check Tables bigger than 2GB - Attention, only the filesize will be checked. Perhaps a Query will be a better idea and the table can be cleared before the ibd file is to big
#!/bin/bash
# Description: Find Tables bigger than 2GB
# to clean up
# Global variables
TmpLog='/tmp/mysql_table.log'
# E-Mail recipients (multiple mail addresses separated by whitespace)
email=''
# InnoDB Table Files
Path='/var/lib/mysql/'
@malias
malias / dnsbl_check_beta_lb.sh
Last active December 3, 2022 14:05
Check RBLs with multiple IPs -
#!/bin/sh
####
# Titel dnsbl_check
# Descritption This Script checks multiple ips and blacklist
####
# Mail recipients (multiple mail addresses separated by whitespace)
mail=''
# Logfiles
LogFile='/tmp/rbltemp.log'
LogRBLfile='/var/log/rblfound.log'
@malias
malias / findbigtables.sh
Created March 14, 2014 11:44
Find Big Tables
#!/bin/bash
# Description: Find Tables bigger than 2GB
# to clean up
# Global variables
TmpLog='/tmp/mysql_table.log'
# E-Mail recipients (multiple mail addresses separated by whitespace)
email=''
# InnoDB Table Files
Path='/var/lib/mysql/'
@malias
malias / mysqlbackup.sh
Last active December 21, 2015 19:19
Make daily mysql backups and delete them after 30 days
#!/bin/bash
#
# Mit diesem Script koennen diverse Datenbank mit einem Schritt gesichert werden.
# Das Zielverzeichnis (backupTargetPath) muss zuerst erstellt werden:
# $ cd /home/BENUTZERNAME/
# $ mkdir mysqlbackup
# Beispiel fuer mehrere Datenbanken ...
# databases='oliveror_db1 oliveror_joomla oliveror_wordpress';
databases='DATENBANKEN';
@malias
malias / sitebackup.sh
Last active December 21, 2015 19:19
Make daily backups from your web server and delete them after 30 day
#!/bin/bash
#
# Mit diesem Script kann eine gesamte Webseite gesichert werden.
# Das Zielverzeichnis (backupTargetPath) muss zuerst erstellt werden:
# $ cd /home/BENUTZERNAME/
# $ mkdir websitebackup
# Datum; Bitte nicht anpassen
date=`/bin/date "+%Y-%m-%d-%H%M%S"`
@malias
malias / chmodmagick.sh
Last active December 21, 2015 19:18
With this script, u can change permissions with a default value (files=644 & directories=755). Change the path to ur directory and start the script from ur console or cronjob
#!/bin/bash
#
#
## Der PATH muss angepasst werden
## Für die Webseite kann z.b. /home/[BENUTZERNAME]/public_html/
## Bsp: Path='/home/oliveror/public_html/'
Path='/home/[BENUTZERNAME]/[PFAD]/'
function setChmod {
ls -1 "$1" | while read file
do