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 | |
clear | |
setenforce 0 >> /dev/null 2>&1 | |
# Gets Distro type. | |
if [ -d /etc/pve ]; then | |
OS=Proxmox | |
REL=$(/usr/bin/pveversion) | |
elif [ -f /etc/debian_version ]; 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
""" | |
Copy your SSH public key into a remote | |
host's `~/.ssh/authorized_keys` file. | |
pip install paramiko | |
Usage: ssh-copy-id.py <host> <username> | |
""" | |
from paramiko import SSHClient, AutoAddPolicy | |
import sys |
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
from requests import get # pip install requests | |
""" | |
Examples: | |
Docs: | |
- Create email (add_pop): https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Aadd_pop | |
- Delete email (delete_pop): https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Adelete_pop | |
- Change pass (passwd_pop): https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Apasswd_pop |
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 | |
# Cloudflare as Dynamic DNS | |
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/ | |
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/ | |
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/ | |
# Fixed and documented version by Christian Gambardella (https://gambo.io) | |
# 1. Create a cloudflare account | |
# 2. Create a zone and a record with any ip address. | |
# It will be updated by the script. |
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
#All backups go to here automatically: | |
#/var/lib/vz/dump | |
#install rclone if uninstalled or update available | |
#downloads page is http://rclone.org/downloads/ | |
wget http://downloads.rclone.org/rclone-current-linux-amd64.zip | |
# version on webpage is http://downloads.rclone.org/rclone-v1.33-linux-amd64.zip | |
# from: http://blog.mattwynne.net/2008/04/26/fetch-and-parse-html-web-page-content-from-bash-wow/ | |
# Download ZIP, keep zip in working folder, check future runs against HTML piped through w3c for newer versions | |
# from: http://tips.webdesign10.com/scrape-web-pages-gnu-linux-shell: |