Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network
This file contains hidden or 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 | |
set -o errexit | |
clear | |
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n" | |
### HOW TO USE | |
### Pre-req: | |
### - run on a Proxmox 6 server | |
### - a dhcp server should be active on vmbr1 |
This file contains hidden or 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
--- | |
- hosts: servers | |
become: true | |
become_user: root | |
tasks: | |
- name: Update apt repo and cache on all Debian/Ubuntu boxes | |
apt: update_cache=yes cache_valid_time=3600 | |
register: update |
This file contains hidden or 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 | |
# VARIABLES DECLARATION | |
BACKUP_DATE=`date +%Y-%m-%d` | |
BACKUP_FILE="/tmp/backup_${BACKUP_DATE}.tar.gz" | |
HOST= | |
USER= | |
PASSWORD= | |
FILES= #/etc /home/user.....etc |
This file contains hidden or 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 | |
logInfo(){ | |
logger -t cloudflare_ipset_renew -p user.info $1 | |
} | |
IPS_FILE_NEW="/tmp/cloudflare_ips" | |
IPS_FILE_OLD="/tmp/cloudflare_ips_current" | |
IP_SET="cloudflare" | |
IP_LIST_URL="https://www.cloudflare.com/ips-v4" |
This file contains hidden or 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 | |
# require mediainfo package to be installed | |
folder=${1%/} | |
current_file="" | |
trap get_out SIGINT SIGTERM | |
convert () { | |
current_file="$2" | |
/opt/emby-server/bin/emby-ffmpeg -n -v error -i "$1" -map 0 -c:v libx264 -scodec copy -crf 18 -vf format=yuv420p -c:a copy "$2" | |
current_file="" | |
#TODO handle error in conversion |
This file contains hidden or 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 -- | |
# Author: @DirtyCajunRice | |
LOCATION=/opt/sickchill | |
# Check if ran by root | |
if [[ $UID -ne 0 ]]; then | |
echo 'Script must be run as root' | |
exit 1 | |
fi |