Skip to content

Instantly share code, notes, and snippets.

View kyuuk's full-sized avatar

Kyuuk kyuuk

  • Paris
View GitHub Profile
@kyuuk
kyuuk / proxmox-cli-and-tips.md
Created May 6, 2023 22:26 — forked from dragolabs/proxmox-cli-and-tips.md
Useful proxmox commands

Find next free VM ID

pvesh get /cluster/nextid

Create containter with external and internal nets

pct create 100 \
    local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
    --cores 2 --cpuunits 1024 \
@kyuuk
kyuuk / debian-ubuntu-install.sh
Created September 25, 2022 22:02
Sickchil install osmc test
#!/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
@kyuuk
kyuuk / convert_anime.sh
Last active June 8, 2022 23:35
Script to convert video files from h264 10bit to h264 8bit using emby-ffmpeg
#!/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
@kyuuk
kyuuk / firewalld_renew_cloudflare_ipset.sh
Last active February 13, 2022 20:54
script to renew cloudflare sources IP list into a firewalld ipset
#!/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"
@kyuuk
kyuuk / backup.sh
Created July 11, 2021 21:06
Online.net ftp backup
#!/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
@kyuuk
kyuuk / ansible_update_debian.yml
Last active July 11, 2021 21:09
Ansible playbook to update multiple debian/ubuntu machines
---
- 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
@kyuuk
kyuuk / create-cloud-template.sh
Last active March 28, 2023 20:36
Script to create proxmox VMs from various openStack linux images credit https://gist.github.com/chriswayg/
#!/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
@kyuuk
kyuuk / doc.adoc
Created May 1, 2021 00:08 — forked from KrustyHack/doc.adoc
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network