Skip to content

Instantly share code, notes, and snippets.

@nadermx
nadermx / create-cloud-template.sh
Created May 24, 2023 22:29 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/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
if currentEnv == prodEnv {
out, err := exec.Command("which", "youtube-dl").CombinedOutput()
if err != nil {
log.Printf("unable to autodetect youtube-dl path: %v\n", err)
} else {
YoutubeDLPath = string(bytes.TrimSpace(out))
}
}
func pipeThruFfmpegToMp4(vi *VideoInfo, rw web.ResponseWriter) error {
var ffmpeg *exec.Cmd