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
<?php | |
/** | |
* Generate uuids for clients and admins that don't have uuids set. | |
* | |
* The WHMCS 7.4.1 update process automatically inserts uuids, but if your | |
* installation bypasses WHMCS update routines then this will generate uuids for | |
* the client and admin users that don't have one yet. | |
* | |
* Warning! Please back up at least your tblclient and tbladmin tables before | |
* running this! |
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
<?php | |
class Kloxo | |
{ | |
public $CI; | |
public $KloxoCore; | |
public $helper; | |
public function __construct() | |
{ |
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
# Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
## | |
## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
## | |
df -h | |
# Filesystem Size Used Avail Use% Mounted on | |
# /dev/mapper/pve-root 37G 37G 0 100% / | |
# tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
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
# Check disk space before | |
df -h | |
# Delete local-lvm storage in gui | |
lvremove /dev/pve/data | |
lvresize -l +100%FREE /dev/pve/root | |
resize2fs /dev/mapper/pve-root |
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 | |
iatest=$(expr index "$-" i) | |
####################################################### | |
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
####################################################### | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc |
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 | |
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") | |
# CHANGE THESE | |
auth_email="[email protected]" | |
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | Login >> My Profile >>> Scroll down to API Keys and locate Global API Key >>>> Click API Key to see your API identifier | |
record_name="www.example.com" | |
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353" | |
record_identifier_ipv4="372e67954025e0ba6aaa6d586b9e0b59" # use List DNS Records api to get record id, link below ↓ or see help above. |
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 | |
SERVER_NAME="$(ifconfig | grep broadcast | awk {'print $2'} | head -1)" # get IP | |
# SERVER_NAME="$(ifconfig | grep broadcast | awk {'print $2'} | awk '{if(NR==1) print $0}')" | |
# SERVER_NAME="$(ifconfig | grep broadcast | awk {'print $2'} | sed -n 1p)" | |
TIMESTAMP=$(date +"%F") | |
BACKUP_DIR="/root/backup/$TIMESTAMP" | |
MYSQL_USER="user" | |
MYSQL_PASSWORD="pass" | |
MYSQL=/usr/bin/mysql |
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 | |
MYSQL=`which mysql` | |
MYSQLUSER=root | |
MYSQLPASSWD=`grep ^mysql= /usr/local/directadmin/scripts/setup.txt|cut -d'=' -f2` | |
MYSQLHOST=localhost | |
DST=/var/spool/mysqlsfp | |
DST=$DST/`date +%Y-%m-%d` |
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 | |
#Server hardening script for cPanel servers | |
# Make sure only root can run this script | |
if [ "$(id -u)" != "0" ]; then | |
echo -e "\e[93m This script must be run as root \e[0m" | |
exit 1 | |
fi | |
echo -e "\e[1;36;40m Server Hardening initiated \e[0m" |
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
<?php | |
$cpaneluser = 'user'; // cPanel username | |
$cpaneluserpass = 'pass'; // cPanel password | |
$theme = 'paper_lantern'; // Must match current selected cPanel theme ('paper_lantern' in the majority of cases, 'x3' is possible as well) | |
$ftp = true; // If it's false the backup will be stored in user's home directory, otherwise it will be uploaded via FTP to some custom location | |
$ftpserver = 'serverX.web-hosting.com'; // Must be localhost for current server or custom hostname for remote FTP upload | |
$ftpusername = 'user'; // cPanel/SFTP username. Should be the same as cPanel username for local upload or custom for remote upload | |
$ftppassword = 'pass'; // cPanel/SFTP password. Should be the same as cPanel password for local upload or custom for remote upload | |
$ftpport = '21098'; // SFTP port. Should be 21 in most cases. | |
$ftpdirectory = '/home/user/backups'; // Directory on FTP server to store backups. MUST EXIST BEFORE BACKUP OR BACKUP PROCESS WILL FAIL |
OlderNewer