View shred.sh
#!/bin/bash
#If you want more "passes" change vzun0 for vzun1 or any other number (process will be slower!)
find /mnt/backup -type f -print0 | xargs -0 shred -vzun0
View docker-compose.yml
gitlab:
image: 'gitlab/gitlab-ce:latest'
container_name: gitlab
restart: always
hostname: 'gitlab.mcu.dc'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.mcu.dc:8090'
gitlab_rails['gitlab_shell_ssh_port'] = 2290
gitlab_rails['smtp_enable'] = true
View senderscore.sh
#!/usr/bin/env bash │ject-with tcp-reset
# usage: ./senderscore.sh 74.91.28.11
if [ -z "$1" ]
then
echo "IP is missing as arguemnt."
exit
fi
IP=$1
View phplint.sh
find . -name "*.php" -print0 | xargs -0 -n1 -P $(nproc) php -l | grep -v '^No'
View install-php-tools.sh
#!/bin/bash
#To execute it directly: sudo bash <(curl -s https://gist.githubusercontent.com/agarzon/ecb0b92d4c8e1bbde126534c76721a58/raw/install-php-tools.sh)
BIN_PATH=/usr/local/bin/
#COMPOSER
sudo curl -LsS https://getcomposer.org/composer.phar -o ${BIN_PATH}composer
sudo chmod a+x ${BIN_PATH}composer
View letsencrypt-hostname.sh
#!/bin/bash -e
### Copyright 1999-2015. Parallels IP Holdings GmbH. All Rights Reserved.
### Secure plesk clean installation with hostname certificate by Let's Encrypt
export PYTHONWARNINGS="ignore:Non-standard path"
LE_HOME=${LE_HOME:-"/usr/local/psa/var/modules/letsencrypt"}
HOSTNAME=$(hostname)
# Use staging server for testing
# --server https://acme-staging.api.letsencrypt.org/directory
View remove_old_kernels.sh
dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'(uname -r)'/q;p' | xargs sudo apt-get -y purge
View mysql_backup.sh
#!/bin/bash
TIMESTAMP=$(date +'%Y-%m-%d_%Hh%Mm')
BACKUP_FOLDER=/mnt/backup/mysql
MYSQL_USER=admin
MYSQL_PASS=`cat /etc/psa/.psa.shadow`
MAX_DAYS=15
DATABASES=`mysql --user=$MYSQL_USER -p$MYSQL_PASS -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema)"`
mkdir -p "$BACKUP_FOLDER"
View index.php
<?php
/*
*************************************************************************
* *
* WHMCS - The Complete Client Management, Billing & Support Solution *
* Copyright (c) WHMCS Ltd. All Rights Reserved, *
* Release Date: 24th November 2011 *
* Version 5.0 *
* *
*************************************************************************
View queueCounter.sh
#!/bin/sh
MAIL_BIN=`command -v mail`
QUEUE_SIZE=`/usr/sbin/postqueue -p | tail -n1 | awk '{print $5}'`
QUEUE_SUMMARY=`/usr/sbin/qshape -s deferred | head`
MAILTO="xxx@gmail.com"
LIMIT=100
function send_notification_mail() {
echo $QUEUE_SUMMARY | $MAIL_BIN -s "WARNING: mail queue critical on $HOSTNAME" $MAILTO