mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-06 07:49:17 +00:00
Merge branch 'community-scripts:main' into connorjfarrell/zoneminder
This commit is contained in:
commit
b105a16562
33
CHANGELOG.md
33
CHANGELOG.md
@ -17,6 +17,39 @@ All LXC instances created using this repository come pre-installed with Midnight
|
|||||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||||
|
|
||||||
|
|
||||||
|
## 2025-01-23
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Feature: Add Debian Disk Size / Redesign / Increase Disk [@MickLesk](https://github.com/MickLesk) ([#1695](https://github.com/community-scripts/ProxmoxVE/pull/1695))
|
||||||
|
- Fix: Paperless Service Timings & Optimization: Ghostscript Installation [@MickLesk](https://github.com/MickLesk) ([#1688](https://github.com/community-scripts/ProxmoxVE/pull/1688))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Refactor ScriptInfoBlocks and siteConfig to properly show the most populair scripts [@BramSuurdje](https://github.com/BramSuurdje) ([#1697](https://github.com/community-scripts/ProxmoxVE/pull/1697))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- Update build.func: Ubuntu advanced settings version [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1701](https://github.com/community-scripts/ProxmoxVE/pull/1701))
|
||||||
|
|
||||||
|
## 2025-01-22
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Tweak: LubeLogger Script Upcoming Changes 1.4.3 [@JcMinarro](https://github.com/JcMinarro) ([#1656](https://github.com/community-scripts/ProxmoxVE/pull/1656))
|
||||||
|
- Fix: SQL Server 2022 Install [@MickLesk](https://github.com/MickLesk) ([#1669](https://github.com/community-scripts/ProxmoxVE/pull/1669))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Refactor Sidebar component to display unique scripts count [@BramSuurdje](https://github.com/BramSuurdje) ([#1681](https://github.com/community-scripts/ProxmoxVE/pull/1681))
|
||||||
|
- Refactor various components and configuration for mobile responsiveness. [@BramSuurdje](https://github.com/BramSuurdje) ([#1679](https://github.com/community-scripts/ProxmoxVE/pull/1679))
|
||||||
|
- Add Docker-VM to Containers & Docker Category [@thost96](https://github.com/thost96) ([#1667](https://github.com/community-scripts/ProxmoxVE/pull/1667))
|
||||||
|
- Moving SQL Server 2022 to database category [@CamronBorealis](https://github.com/CamronBorealis) ([#1659](https://github.com/community-scripts/ProxmoxVE/pull/1659))
|
||||||
|
|
||||||
## 2025-01-21
|
## 2025-01-21
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -42,14 +42,17 @@ function update_script() {
|
|||||||
msg_info "Updating ${APP} to v${RELEASE}"
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
cd /opt
|
cd /opt
|
||||||
wget -q https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
wget -q https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
||||||
mkdir -p /tmp/lubeloggerData/wwwroot
|
mkdir -p /tmp/lubeloggerData/data
|
||||||
cp /opt/lubelogger/appsettings.json /tmp/lubeloggerData/appsettings.json
|
cp /opt/lubelogger/appsettings.json /tmp/lubeloggerData/appsettings.json
|
||||||
cp -r /opt/lubelogger/config /tmp/lubeloggerData/
|
cp -r /opt/lubelogger/data/ /tmp/lubeloggerData/
|
||||||
cp -r /opt/lubelogger/data /tmp/lubeloggerData/
|
|
||||||
[[ -e /opt/lubelogger/wwwroot/translations ]] && cp -r /opt/lubelogger/wwwroot/translations /tmp/lubeloggerData/wwwroot/
|
# Lubelogger has moved multiples folders to the 'data' folder, and we need to move them before the update to keep the user data
|
||||||
[[ -e /opt/lubelogger/wwwroot/documents ]] && cp -r /opt/lubelogger/wwwroot/documents /tmp/lubeloggerData/wwwroot/
|
# Github Discussion: https://github.com/hargata/lubelog/discussions/787
|
||||||
[[ -e /opt/lubelogger/wwwroot/images ]] && cp -r /opt/lubelogger/wwwroot/images /tmp/lubeloggerData/wwwroot/
|
[[ -e /opt/lubelogger/config ]] && cp -r /opt/lubelogger/config /tmp/lubeloggerData/data/
|
||||||
[[ -e /opt/lubelogger/wwwroot/temp ]] && cp -r /opt/lubelogger/wwwroot/temp /tmp/lubeloggerData/wwwroot/
|
[[ -e /opt/lubelogger/wwwroot/translations ]] && cp -r /opt/lubelogger/wwwroot/translations /tmp/lubeloggerData/data/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/documents ]] && cp -r /opt/lubelogger/wwwroot/documents /tmp/lubeloggerData/data/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/images ]] && cp -r /opt/lubelogger/wwwroot/images /tmp/lubeloggerData/data/
|
||||||
|
[[ -e /opt/lubelogger/wwwroot/temp ]] && cp -r /opt/lubelogger/wwwroot/temp /tmp/lubeloggerData/data/
|
||||||
[[ -e /opt/lubelogger/log ]] && cp -r /opt/lubelogger/log /tmp/lubeloggerData/
|
[[ -e /opt/lubelogger/log ]] && cp -r /opt/lubelogger/log /tmp/lubeloggerData/
|
||||||
rm -rf /opt/lubelogger
|
rm -rf /opt/lubelogger
|
||||||
unzip -qq LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip -d lubelogger
|
unzip -qq LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip -d lubelogger
|
||||||
|
134
frontend/src/app/category-view/page.tsx
Normal file
134
frontend/src/app/category-view/page.tsx
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { Card, CardContent } from "@/components/ui/card";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { Category } from "@/lib/types";
|
||||||
|
|
||||||
|
const defaultLogo = "/default-logo.png"; // Fallback logo path
|
||||||
|
|
||||||
|
const MAX_DESCRIPTION_LENGTH = 100; // Set max length for description
|
||||||
|
|
||||||
|
const CategoryView = () => {
|
||||||
|
const [categories, setCategories] = useState<Category[]>([]);
|
||||||
|
const [selectedCategory, setSelectedCategory] = useState<Category | null>(null);
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const fetchCategories = async () => {
|
||||||
|
try {
|
||||||
|
const basePath = process.env.NODE_ENV === "production" ? "/ProxmoxVE" : "";
|
||||||
|
const response = await fetch(`${basePath}/api/categories`);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error("Failed to fetch categories");
|
||||||
|
}
|
||||||
|
const data = await response.json();
|
||||||
|
console.log("Fetched categories:", data); // Debugging
|
||||||
|
setCategories(data);
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching categories:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchCategories();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleCategoryClick = (category: Category) => {
|
||||||
|
setSelectedCategory(category);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBackClick = () => {
|
||||||
|
setSelectedCategory(null);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleScriptClick = (scriptSlug: string) => {
|
||||||
|
router.push(`/scripts?id=${scriptSlug}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
const truncateDescription = (text: string) => {
|
||||||
|
return text.length > MAX_DESCRIPTION_LENGTH
|
||||||
|
? `${text.slice(0, MAX_DESCRIPTION_LENGTH)}...`
|
||||||
|
: text;
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="p-4 mt-20">
|
||||||
|
{categories.length === 0 && (
|
||||||
|
<p className="text-center text-gray-500">No categories available. Please check the API endpoint.</p>
|
||||||
|
)}
|
||||||
|
{selectedCategory ? (
|
||||||
|
<div>
|
||||||
|
<Button variant="default" onClick={handleBackClick} className="mb-4">
|
||||||
|
Back to Categories
|
||||||
|
</Button>
|
||||||
|
<h2 className="text-xl font-semibold mb-4">{selectedCategory.name}</h2>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
||||||
|
{selectedCategory.scripts
|
||||||
|
.sort((a, b) => a.name.localeCompare(b.name))
|
||||||
|
.map((script) => (
|
||||||
|
<Card key={script.name} className="p-4 cursor-pointer" onClick={() => handleScriptClick(script.slug)}>
|
||||||
|
<CardContent className="flex flex-col gap-4">
|
||||||
|
<div className="flex items-center gap-4">
|
||||||
|
<img
|
||||||
|
src={script.logo || defaultLogo}
|
||||||
|
alt={script.name}
|
||||||
|
className="h-12 w-12 object-contain"
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<h3 className="text-lg font-bold">{script.name}</h3>
|
||||||
|
<p className="text-sm text-gray-500"><b>Created at:</b> {script.date_created || "No date available"}</p>
|
||||||
|
<p className="text-sm text-gray-700">
|
||||||
|
{truncateDescription(script.description || "No description available.")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="text-sm text-gray-600">
|
||||||
|
<b>CPU:</b> {script.install_methods[0]?.resources.cpu || "N/A"}vCPU | <b>RAM:</b> {script.install_methods[0]?.resources.ram || "N/A"}MB | <b>HDD:</b> {script.install_methods[0]?.resources.hdd || "N/A"}GB
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div>
|
||||||
|
<div className="flex justify-between items-center mb-6">
|
||||||
|
<h1 className="text-2xl font-bold">Categories</h1>
|
||||||
|
<p className="text-sm text-gray-500">
|
||||||
|
{categories.reduce((acc, cat) => acc + (cat.scripts?.length || 0), 0)} Total scripts
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
||||||
|
{categories.map((category) => (
|
||||||
|
<Card
|
||||||
|
key={category.name}
|
||||||
|
onClick={() => handleCategoryClick(category)}
|
||||||
|
className="cursor-pointer hover:shadow-lg flex flex-col items-center justify-center"
|
||||||
|
>
|
||||||
|
<CardContent className="flex flex-col items-center">
|
||||||
|
<div className="flex flex-wrap justify-center gap-1 mb-2">
|
||||||
|
{category.scripts && category.scripts.slice(0, 4).map((script, index) => (
|
||||||
|
<img
|
||||||
|
key={index}
|
||||||
|
src={script.logo || defaultLogo}
|
||||||
|
alt={script.name || "Script logo"}
|
||||||
|
className="h-6 w-6 object-contain"
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<h3 className="text-lg font-bold mb-1">{category.name}</h3>
|
||||||
|
<p className="text-sm text-gray-500 text-center">
|
||||||
|
{(category as any).description || "No description available."}
|
||||||
|
</p>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CategoryView;
|
@ -34,113 +34,104 @@ export default function Page() {
|
|||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full mt-16">
|
<div className="w-full mt-16">
|
||||||
<Particles
|
<Particles
|
||||||
className="absolute inset-0 -z-40"
|
className="absolute inset-0 -z-40"
|
||||||
quantity={100}
|
quantity={100}
|
||||||
ease={80}
|
ease={80}
|
||||||
color={color}
|
color={color}
|
||||||
refresh
|
refresh
|
||||||
/>
|
/>
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
<div className="flex h-[80vh] flex-col items-center justify-center gap-4 py-20 lg:py-40">
|
<div className="flex h-[80vh] flex-col items-center justify-center gap-4 py-20 lg:py-40">
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger>
|
<DialogTrigger>
|
||||||
<div>
|
<div>
|
||||||
<AnimatedGradientText>
|
<AnimatedGradientText>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
`absolute inset-0 block size-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`,
|
`absolute inset-0 block size-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`,
|
||||||
`p-px ![mask-composite:subtract]`,
|
`p-px ![mask-composite:subtract]`,
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
❤️ <Separator className="mx-2 h-4" orientation="vertical" />
|
❤️ <Separator className="mx-2 h-4" orientation="vertical" />
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
`animate-gradient bg-gradient-to-r from-[#ffaa40] via-[#9c40ff] to-[#ffaa40] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent`,
|
`animate-gradient bg-gradient-to-r from-[#ffaa40] via-[#9c40ff] to-[#ffaa40] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent`,
|
||||||
`inline`,
|
`inline`,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
Scripts by Tteck
|
Scripts by tteck
|
||||||
</span>
|
</span>
|
||||||
</AnimatedGradientText>
|
</AnimatedGradientText>
|
||||||
</div>
|
</div>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Thank You!</DialogTitle>
|
<DialogTitle>Thank You!</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
A big thank you to Tteck and the many contributors who have
|
A big thank you to tteck and the many contributors who have
|
||||||
made this project possible. Your hard work is truly
|
made this project possible. Your hard work is truly
|
||||||
appreciated by the entire Proxmox community!
|
appreciated by the entire Proxmox community!
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<CardFooter className="flex flex-col gap-2">
|
<CardFooter className="flex flex-col gap-2">
|
||||||
<Button className="w-full" variant="outline" asChild>
|
<Button className="w-full" variant="outline" asChild>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/tteck"
|
href="https://github.com/tteck"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="flex items-center justify-center"
|
className="flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<FaGithub className="mr-2 h-4 w-4" /> Tteck's GitHub
|
<FaGithub className="mr-2 h-4 w-4" /> Tteck's GitHub
|
||||||
</a>
|
</a>
|
||||||
</Button>
|
</Button>
|
||||||
<Button className="w-full" asChild>
|
<Button className="w-full" asChild>
|
||||||
<a
|
<a
|
||||||
href={`https://github.com/community-scripts/${basePath}`}
|
href={`https://github.com/community-scripts/${basePath}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="flex items-center justify-center"
|
className="flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<ExternalLink className="mr-2 h-4 w-4" /> Proxmox Helper
|
<ExternalLink className="mr-2 h-4 w-4" /> Proxmox Helper
|
||||||
Scripts
|
Scripts
|
||||||
</a>
|
</a>
|
||||||
</Button>
|
</Button>
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
<h1 className="max-w-2xl text-center text-5xl font-semibold tracking-tighter md:text-7xl">
|
<h1 className="max-w-2xl text-center text-3xl font-semibold tracking-tighter md:text-7xl">
|
||||||
Make managing your Homelab a breeze
|
Make managing your Homelab a breeze
|
||||||
</h1>
|
</h1>
|
||||||
<p className="max-w-2xl text-center text-lg leading-relaxed tracking-tight text-muted-foreground md:text-xl">
|
<div className="max-w-2xl gap-2 flex flex-col text-center sm:text-lg text-sm leading-relaxed tracking-tight text-muted-foreground md:text-xl">
|
||||||
We are a community-driven initiative that simplifies the setup of
|
<p>
|
||||||
Proxmox Virtual Environment (VE).
|
We are a community-driven initiative that simplifies the setup
|
||||||
<br />
|
of Proxmox Virtual Environment (VE).
|
||||||
<br />
|
</p>
|
||||||
Originally created by{" "}
|
<p>
|
||||||
<a href="https://github.com/tteck" target="_blank">
|
With 200+ scripts to help you manage your{" "}
|
||||||
tteck
|
<b>Proxmox VE environment</b>. Whether you're a seasoned
|
||||||
</a>
|
user or a newcomer, we've got you covered.
|
||||||
, these scripts automate and streamline
|
</p>
|
||||||
<br />
|
</div>
|
||||||
the process of creating and configuring Linux containers (LXC) and
|
</div>
|
||||||
virtual machines (VMs) on Proxmox VE.
|
<div className="flex flex-row gap-3">
|
||||||
<br />
|
<Link href="/scripts">
|
||||||
<br />
|
<Button
|
||||||
With 200+ scripts to help you manage your{" "}
|
size="lg"
|
||||||
<b>Proxmox VE environment</b>.<br />
|
variant="expandIcon"
|
||||||
Whether you're a seasoned user or a newcomer, we've got
|
Icon={CustomArrowRightIcon}
|
||||||
you covered.
|
iconPlacement="right"
|
||||||
</p>
|
className="hover:"
|
||||||
</div>
|
>
|
||||||
<div className="flex flex-row gap-3">
|
View Scripts
|
||||||
<Link href="/scripts">
|
</Button>
|
||||||
<Button
|
</Link>
|
||||||
size="lg"
|
</div>
|
||||||
variant="expandIcon"
|
</div>
|
||||||
Icon={CustomArrowRightIcon}
|
</div>
|
||||||
iconPlacement="right"
|
</div>
|
||||||
className="hover:"
|
);
|
||||||
>
|
|
||||||
View Scripts
|
|
||||||
</Button>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ export function LatestScripts({ items }: { items: Category[] }) {
|
|||||||
>
|
>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="flex items-center gap-3">
|
<CardTitle className="flex items-center gap-3">
|
||||||
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-accent p-1">
|
<div className="flex h-16 w-16 min-w-16 items-center justify-center rounded-lg bg-accent p-1">
|
||||||
<Image
|
<Image
|
||||||
src={script.logo || `/${basePath}/logo.png`}
|
src={script.logo || `/${basePath}/logo.png`}
|
||||||
unoptimized
|
unoptimized
|
||||||
@ -142,7 +142,7 @@ export function LatestScripts({ items }: { items: Category[] }) {
|
|||||||
export function MostViewedScripts({ items }: { items: Category[] }) {
|
export function MostViewedScripts({ items }: { items: Category[] }) {
|
||||||
const mostViewedScripts = items.reduce((acc: Script[], category) => {
|
const mostViewedScripts = items.reduce((acc: Script[], category) => {
|
||||||
const foundScripts = category.scripts.filter((script) =>
|
const foundScripts = category.scripts.filter((script) =>
|
||||||
mostPopularScripts.includes(script.name),
|
mostPopularScripts.includes(script.slug),
|
||||||
);
|
);
|
||||||
return acc.concat(foundScripts);
|
return acc.concat(foundScripts);
|
||||||
}, []);
|
}, []);
|
||||||
@ -162,7 +162,7 @@ export function MostViewedScripts({ items }: { items: Category[] }) {
|
|||||||
>
|
>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="flex items-center gap-3">
|
<CardTitle className="flex items-center gap-3">
|
||||||
<div className="flex max-h-16 min-h-16 min-w-16 max-w-16 items-center justify-center rounded-lg bg-accent p-1">
|
<div className="flex size-16 min-w-16 items-center justify-center rounded-lg bg-accent p-1">
|
||||||
<Image
|
<Image
|
||||||
unoptimized
|
unoptimized
|
||||||
src={script.logo || `/${basePath}/logo.png`}
|
src={script.logo || `/${basePath}/logo.png`}
|
||||||
|
@ -1,35 +1,43 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Category } from "@/lib/types";
|
import type { Category, Script } from "@/lib/types";
|
||||||
import ScriptAccordion from "./ScriptAccordion";
|
import ScriptAccordion from "./ScriptAccordion";
|
||||||
|
|
||||||
const Sidebar = ({
|
const Sidebar = ({
|
||||||
items,
|
items,
|
||||||
selectedScript,
|
selectedScript,
|
||||||
setSelectedScript,
|
setSelectedScript,
|
||||||
}: {
|
}: {
|
||||||
items: Category[];
|
items: Category[];
|
||||||
selectedScript: string | null;
|
selectedScript: string | null;
|
||||||
setSelectedScript: (script: string | null) => void;
|
setSelectedScript: (script: string | null) => void;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
const uniqueScripts = items.reduce((acc, category) => {
|
||||||
<div className="flex min-w-72 flex-col sm:max-w-72">
|
for (const script of category.scripts) {
|
||||||
<div className="flex items-end justify-between pb-4">
|
if (!acc.some((s) => s.name === script.name)) {
|
||||||
<h1 className="text-xl font-bold">Categories</h1>
|
acc.push(script);
|
||||||
<p className="text-xs italic text-muted-foreground">
|
}
|
||||||
{items.reduce((acc, category) => acc + category.scripts.length, 0)}{" "}
|
}
|
||||||
Total scripts
|
return acc;
|
||||||
</p>
|
}, [] as Script[]);
|
||||||
</div>
|
|
||||||
<div className="rounded-lg">
|
return (
|
||||||
<ScriptAccordion
|
<div className="flex min-w-72 flex-col sm:max-w-72">
|
||||||
items={items}
|
<div className="flex items-end justify-between pb-4">
|
||||||
selectedScript={selectedScript}
|
<h1 className="text-xl font-bold">Categories</h1>
|
||||||
setSelectedScript={setSelectedScript}
|
<p className="text-xs italic text-muted-foreground">
|
||||||
/>
|
{uniqueScripts.length} Total scripts
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
<div className="rounded-lg">
|
||||||
|
<ScriptAccordion
|
||||||
|
items={items}
|
||||||
|
selectedScript={selectedScript}
|
||||||
|
setSelectedScript={setSelectedScript}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Sidebar;
|
export default Sidebar;
|
@ -5,7 +5,7 @@ export default function Footer() {
|
|||||||
return (
|
return (
|
||||||
<div className="supports-backdrop-blur:bg-background/90 mt-auto flex border-t border-border bg-background/40 py-6 backdrop-blur-lg">
|
<div className="supports-backdrop-blur:bg-background/90 mt-auto flex border-t border-border bg-background/40 py-6 backdrop-blur-lg">
|
||||||
<div className="flex w-full justify-between">
|
<div className="flex w-full justify-between">
|
||||||
<div className="mx-6 w-full max-w-7xl text-sm text-muted-foreground">
|
<div className="mx-6 w-full max-w-7xl text-xs sm:text-sm text-muted-foreground">
|
||||||
Website built by the community. The source code is avaliable on{" "}
|
Website built by the community. The source code is avaliable on{" "}
|
||||||
<Link
|
<Link
|
||||||
href={`https://github.com/community-scripts/${basePath}`}
|
href={`https://github.com/community-scripts/${basePath}`}
|
||||||
|
@ -9,12 +9,7 @@ import { navbarLinks } from "@/config/siteConfig";
|
|||||||
import CommandMenu from "./CommandMenu";
|
import CommandMenu from "./CommandMenu";
|
||||||
import StarOnGithubButton from "./ui/star-on-github-button";
|
import StarOnGithubButton from "./ui/star-on-github-button";
|
||||||
import { ThemeToggle } from "./ui/theme-toggle";
|
import { ThemeToggle } from "./ui/theme-toggle";
|
||||||
import {
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
||||||
Tooltip,
|
|
||||||
TooltipContent,
|
|
||||||
TooltipProvider,
|
|
||||||
TooltipTrigger,
|
|
||||||
} from "./ui/tooltip";
|
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
@ -33,56 +28,59 @@ function Navbar() {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={`fixed left-0 top-0 z-50 flex w-screen justify-center px-4 xl:px-0 ${
|
className={`fixed left-0 top-0 z-50 flex w-screen justify-center px-4 xl:px-0 ${
|
||||||
isScrolled ? "glass border-b bg-background/50" : ""
|
isScrolled ? "glass border-b bg-background/50" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex h-20 w-full max-w-7xl flex-row-reverse items-center justify-between sm:flex-row">
|
<div className="flex h-20 w-full max-w-7xl items-center justify-between sm:flex-row">
|
||||||
<Link
|
<Link
|
||||||
href={"/"}
|
href={"/"}
|
||||||
className="flex cursor-pointer flex-row-reverse items-center gap-2 font-semibold sm:flex-row"
|
className="flex cursor-pointer w-full justify-center sm:justify-start flex-row-reverse items-center gap-2 font-semibold sm:flex-row"
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
height={18}
|
height={18}
|
||||||
unoptimized
|
unoptimized
|
||||||
width={18}
|
width={18}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
src="logo.png"
|
src="/ProxmoxVE/logo.png"
|
||||||
/>
|
className=""
|
||||||
<span className="hidden lg:block">Proxmox VE Helper-Scripts</span>
|
/>
|
||||||
</Link>
|
<span className="hidden md:block">Proxmox VE Helper-Scripts</span>
|
||||||
<div className="flex gap-2">
|
</Link>
|
||||||
<CommandMenu />
|
<div className="flex gap-2">
|
||||||
<StarOnGithubButton />
|
<CommandMenu />
|
||||||
{navbarLinks.map(({ href, event, icon, text }) => (
|
<StarOnGithubButton />
|
||||||
<TooltipProvider key={event}>
|
{navbarLinks.map(({ href, event, icon, text, mobileHidden }) => (
|
||||||
<Tooltip delayDuration={100}>
|
<TooltipProvider key={event}>
|
||||||
<TooltipTrigger>
|
<Tooltip delayDuration={100}>
|
||||||
<Button variant="ghost" size={"icon"} asChild>
|
<TooltipTrigger
|
||||||
<Link
|
className={mobileHidden ? "hidden lg:block" : ""}
|
||||||
target="_blank"
|
>
|
||||||
href={href}
|
<Button variant="ghost" size={"icon"} asChild>
|
||||||
data-umami-event={event}
|
<Link
|
||||||
>
|
target="_blank"
|
||||||
{icon}
|
href={href}
|
||||||
<span className="sr-only">{text}</span>
|
data-umami-event={event}
|
||||||
</Link>
|
>
|
||||||
</Button>
|
{icon}
|
||||||
</TooltipTrigger>
|
<span className="sr-only">{text}</span>
|
||||||
<TooltipContent side="bottom" className="text-xs">
|
</Link>
|
||||||
{text}
|
</Button>
|
||||||
</TooltipContent>
|
</TooltipTrigger>
|
||||||
</Tooltip>
|
<TooltipContent side="bottom" className="text-xs">
|
||||||
</TooltipProvider>
|
{text}
|
||||||
))}
|
</TooltipContent>
|
||||||
<ThemeToggle />
|
</Tooltip>
|
||||||
</div>
|
</TooltipProvider>
|
||||||
</div>
|
))}
|
||||||
</div>
|
<ThemeToggle />
|
||||||
</>
|
</div>
|
||||||
);
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Navbar;
|
export default Navbar;
|
||||||
|
@ -1,46 +1,48 @@
|
|||||||
import { OperatingSystem } from "@/lib/types";
|
import { OperatingSystem } from "@/lib/types";
|
||||||
import { MessagesSquare, Scroll } from "lucide-react";
|
import { MessagesSquare, Scroll } from "lucide-react";
|
||||||
import { FaDiscord, FaGithub } from "react-icons/fa";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { FaDiscord, FaGithub } from "react-icons/fa";
|
||||||
|
|
||||||
export const basePath = process.env.BASE_PATH;
|
export const basePath = process.env.BASE_PATH;
|
||||||
|
|
||||||
const isMobile = typeof window !== "undefined" && window.innerWidth < 640;
|
const isMobile = typeof window !== "undefined" && window.innerWidth < 640;
|
||||||
|
|
||||||
export const navbarLinks = [
|
export const navbarLinks = [
|
||||||
{
|
{
|
||||||
href: `https://github.com/community-scripts/${basePath}`,
|
href: `https://github.com/community-scripts/${basePath}`,
|
||||||
event: "Github",
|
event: "Github",
|
||||||
icon: <FaGithub className="h-4 w-4" />,
|
icon: <FaGithub className="h-4 w-4" />,
|
||||||
text: "Github",
|
text: "Github",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: `https://discord.gg/2wvnMDgdnU`,
|
href: `https://discord.gg/2wvnMDgdnU`,
|
||||||
event: "Discord",
|
event: "Discord",
|
||||||
icon: <FaDiscord className="h-4 w-4" />,
|
icon: <FaDiscord className="h-4 w-4" />,
|
||||||
text: "Discord",
|
text: "Discord",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: `https://github.com/community-scripts/${basePath}/blob/main/CHANGELOG.md`,
|
href: `https://github.com/community-scripts/${basePath}/blob/main/CHANGELOG.md`,
|
||||||
event: "Change Log",
|
event: "Change Log",
|
||||||
icon: <Scroll className="h-4 w-4" />,
|
icon: <Scroll className="h-4 w-4" />,
|
||||||
text: "Change Log",
|
text: "Change Log",
|
||||||
},
|
mobileHidden: true,
|
||||||
!isMobile
|
},
|
||||||
? {
|
{
|
||||||
href: `https://github.com/community-scripts/${basePath}/discussions`,
|
href: `https://github.com/community-scripts/${basePath}/discussions`,
|
||||||
event: "Discussions",
|
event: "Discussions",
|
||||||
icon: <MessagesSquare className="h-4 w-4" />,
|
icon: <MessagesSquare className="h-4 w-4" />,
|
||||||
text: "Discussions",
|
text: "Discussions",
|
||||||
}
|
mobileHidden: true,
|
||||||
: null,
|
},
|
||||||
].filter(Boolean) as { href: string; event: string; icon: React.ReactNode; text: string }[];
|
].filter(Boolean) as {
|
||||||
|
href: string;
|
||||||
|
event: string;
|
||||||
|
icon: React.ReactNode;
|
||||||
|
text: string;
|
||||||
|
mobileHidden?: boolean;
|
||||||
|
}[];
|
||||||
|
|
||||||
export const mostPopularScripts = [
|
export const mostPopularScripts = ["post-pve-install", "docker", "homeassistant"];
|
||||||
"Proxmox VE Post Install",
|
|
||||||
"Docker",
|
|
||||||
"Home Assistant OS",
|
|
||||||
];
|
|
||||||
|
|
||||||
export const analytics = {
|
export const analytics = {
|
||||||
url: "analytics.proxmoxve-scripts.com",
|
url: "analytics.proxmoxve-scripts.com",
|
||||||
|
@ -37,10 +37,10 @@ $STD npm install --global yarn
|
|||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Installing Actual Budget"
|
msg_info "Installing Actual Budget"
|
||||||
|
cd /opt
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}
|
wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz
|
||||||
#$STD curl -L -o actual-server.tar.gz https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz
|
tar -xzf v${RELEASE}.tar.gz
|
||||||
$STD tar -xzvf v${RELEASE}.tar.gz
|
|
||||||
mv *ctual-server-* /opt/actualbudget
|
mv *ctual-server-* /opt/actualbudget
|
||||||
mkdir -p /opt/actualbudget/server-files
|
mkdir -p /opt/actualbudget/server-files
|
||||||
mkdir -p /opt/actualbudget-data
|
mkdir -p /opt/actualbudget-data
|
||||||
|
@ -14,7 +14,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y \
|
||||||
redis \
|
redis \
|
||||||
postgresql \
|
postgresql \
|
||||||
build-essential \
|
build-essential \
|
||||||
@ -41,7 +41,7 @@ $STD apt-get install -y --no-install-recommends \
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3 Dependencies (Patience)"
|
msg_info "Installing Python3 Dependencies (Patience)"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
@ -50,7 +50,7 @@ $STD apt-get install -y --no-install-recommends \
|
|||||||
msg_ok "Installed Python3 Dependencies"
|
msg_ok "Installed Python3 Dependencies"
|
||||||
|
|
||||||
msg_info "Installing OCR Dependencies (Patience)"
|
msg_info "Installing OCR Dependencies (Patience)"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y \
|
||||||
unpaper \
|
unpaper \
|
||||||
icc-profiles-free \
|
icc-profiles-free \
|
||||||
qpdf \
|
qpdf \
|
||||||
@ -60,7 +60,7 @@ $STD apt-get install -y --no-install-recommends \
|
|||||||
zlib1g \
|
zlib1g \
|
||||||
tesseract-ocr \
|
tesseract-ocr \
|
||||||
tesseract-ocr-eng
|
tesseract-ocr-eng
|
||||||
|
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -q https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz
|
wget -q https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz
|
||||||
$STD tar -xzf ghostscript-10.04.0.tar.gz
|
$STD tar -xzf ghostscript-10.04.0.tar.gz
|
||||||
@ -196,6 +196,7 @@ Requires=redis.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/paperless/src
|
WorkingDirectory=/opt/paperless/src
|
||||||
|
ExecStartPre=/bin/sleep 2
|
||||||
ExecStart=python3 manage.py document_consumer
|
ExecStart=python3 manage.py document_consumer
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
@ -220,7 +221,7 @@ EOF
|
|||||||
sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
|
sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
$STD systemctl enable --now paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service
|
$STD systemctl enable -q --now paperless-webserver paperless-scheduler paperless-task-queue paperless-consumer
|
||||||
msg_ok "Created Services"
|
msg_ok "Created Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
@ -22,27 +22,34 @@ $STD apt install -y \
|
|||||||
coreutils
|
coreutils
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing SQL Server 2022"
|
msg_info "Setup SQL Server 2022"
|
||||||
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
|
$STD curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
$STD curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
||||||
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list
|
$STD curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list
|
||||||
$STD apt-get clean *
|
$STD apt-get clean *
|
||||||
$STD apt-get update -y
|
$STD apt-get update -y
|
||||||
$STD apt-get install -y mssql-server
|
$STD apt-get install -y mssql-server
|
||||||
/opt/mssql/bin/mssql-conf setup
|
msg_ok "Setup Server 2022"
|
||||||
msg_ok "Installed SQL Server 2022"
|
|
||||||
|
|
||||||
msg_info "Installing SQL Server Tools"
|
msg_info "Installing SQL Server Tools"
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
||||||
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
|
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y -qq \
|
||||||
mssql-tools18 \
|
mssql-tools18 \
|
||||||
unixodbc-dev
|
unixodbc-dev
|
||||||
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
|
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile
|
||||||
source ~/.bashrc
|
source ~/.bash_profile
|
||||||
msg_ok "Installed SQL Server Tools"
|
msg_ok "Installed SQL Server Tools"
|
||||||
|
|
||||||
|
read -r -p "Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
/opt/mssql/bin/mssql-conf setup
|
||||||
|
else
|
||||||
|
msg_ok "Skipping SQL Server setup. You can run it later with '/opt/mssql/bin/mssql-conf setup'."
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Start Service"
|
msg_info "Start Service"
|
||||||
systemctl enable -q --now mssql-server
|
systemctl enable -q --now mssql-server
|
||||||
msg_ok "Service started"
|
msg_ok "Service started"
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
"name": "VS Code Server",
|
"name": "VS Code Server",
|
||||||
"slug": "code-server",
|
"slug": "code-server",
|
||||||
"categories": [
|
"categories": [
|
||||||
1
|
1,
|
||||||
|
20,
|
||||||
|
11
|
||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "misc",
|
"type": "misc",
|
||||||
@ -36,4 +38,4 @@
|
|||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "Docker",
|
"name": "Docker",
|
||||||
"slug": "docker-vm",
|
"slug": "docker-vm",
|
||||||
"categories": [
|
"categories": [
|
||||||
2
|
2, 3
|
||||||
],
|
],
|
||||||
"date_created": "2025-01-20",
|
"date_created": "2025-01-20",
|
||||||
"type": "vm",
|
"type": "vm",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name":"SQL Server 2022",
|
"name":"SQL Server 2022",
|
||||||
"slug":"sqlserver2022",
|
"slug":"sqlserver2022",
|
||||||
"categories":[
|
"categories":[
|
||||||
5
|
8
|
||||||
],
|
],
|
||||||
"date_created":"2025-01-14",
|
"date_created":"2025-01-14",
|
||||||
"type":"ct",
|
"type":"ct",
|
||||||
@ -31,6 +31,10 @@
|
|||||||
"password":null
|
"password":null
|
||||||
},
|
},
|
||||||
"notes":[
|
"notes":[
|
||||||
|
{
|
||||||
|
"text":"if you not choose the install setup, execute: `/opt/mssql/bin/mssql-conf setup` in LXC shell.",
|
||||||
|
"type":"info"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"text":"You can setup the admin account 'SA' during installation",
|
"text":"You can setup the admin account 'SA' during installation",
|
||||||
"type":"info"
|
"type":"info"
|
||||||
@ -40,4 +44,4 @@
|
|||||||
"type":"warning"
|
"type":"warning"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
### Generated on 01-21-2025
|
### Generated on 01-22-2025
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
### 2fauth.sh
|
### 2fauth.sh
|
||||||
|
@ -462,8 +462,7 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
fi
|
elif [ "$var_default_version" == "22.04" ]; then
|
||||||
if [ "$var_default_version" == "22.04" ]; then
|
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
"20.04" "Focal" OFF \
|
"20.04" "Focal" OFF \
|
||||||
"22.04" "Jammy" ON \
|
"22.04" "Jammy" ON \
|
||||||
@ -476,9 +475,8 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
fi
|
elif [ "$var_default_version" == "24.04" ]; then
|
||||||
if [ "$var_default_version" == "24.04" ]; then
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
|
||||||
"20.04" "Focal" OFF \
|
"20.04" "Focal" OFF \
|
||||||
"22.04" "Jammy" OFF \
|
"22.04" "Jammy" OFF \
|
||||||
"24.04" "Noble" ON \
|
"24.04" "Noble" ON \
|
||||||
@ -489,9 +487,8 @@ advanced_settings() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
fi
|
else
|
||||||
if [ "$var_default_version" == "24.10" ]; then
|
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
"20.04" "Focal" OFF \
|
"20.04" "Focal" OFF \
|
||||||
"22.04" "Jammy" OFF \
|
"22.04" "Jammy" OFF \
|
||||||
|
169
vm/debian-vm.sh
169
vm/debian-vm.sh
@ -1,9 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 tteck
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: tteck (tteckster)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
@ -23,16 +22,36 @@ NEXTID=$(pvesh get /cluster/nextid)
|
|||||||
|
|
||||||
YW=$(echo "\033[33m")
|
YW=$(echo "\033[33m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
HA=$(echo "\033[1;34m")
|
|
||||||
RD=$(echo "\033[01;31m")
|
RD=$(echo "\033[01;31m")
|
||||||
BGN=$(echo "\033[4;92m")
|
BGN=$(echo "\033[4;92m")
|
||||||
GN=$(echo "\033[1;92m")
|
GN=$(echo "\033[1;92m")
|
||||||
DGN=$(echo "\033[32m")
|
DGN=$(echo "\033[32m")
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
|
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
BOLD=$(echo "\033[1m")
|
||||||
BFR="\\r\\033[K"
|
BFR="\\r\\033[K"
|
||||||
HOLD="-"
|
HOLD=" "
|
||||||
CM="${GN}✓${CL}"
|
TAB=" "
|
||||||
CROSS="${RD}✗${CL}"
|
|
||||||
|
CM="${TAB}✔️${TAB}${CL}"
|
||||||
|
CROSS="${TAB}✖️${TAB}${CL}"
|
||||||
|
INFO="${TAB}💡${TAB}${CL}"
|
||||||
|
OS="${TAB}🖥️${TAB}${CL}"
|
||||||
|
CONTAINERTYPE="${TAB}📦${TAB}${CL}"
|
||||||
|
DISKSIZE="${TAB}💾${TAB}${CL}"
|
||||||
|
CPUCORE="${TAB}🧠${TAB}${CL}"
|
||||||
|
RAMSIZE="${TAB}🛠️${TAB}${CL}"
|
||||||
|
CONTAINERID="${TAB}🆔${TAB}${CL}"
|
||||||
|
HOSTNAME="${TAB}🏠${TAB}${CL}"
|
||||||
|
BRIDGE="${TAB}🌉${TAB}${CL}"
|
||||||
|
GATEWAY="${TAB}🌐${TAB}${CL}"
|
||||||
|
DEFAULT="${TAB}⚙️${TAB}${CL}"
|
||||||
|
MACADDRESS="${TAB}🔗${TAB}${CL}"
|
||||||
|
VLANTAG="${TAB}🏷️${TAB}${CL}"
|
||||||
|
CREATING="${TAB}🚀${TAB}${CL}"
|
||||||
|
ADVANCED="${TAB}🧩${TAB}${CL}"
|
||||||
|
|
||||||
THIN="discard=on,ssd=1,"
|
THIN="discard=on,ssd=1,"
|
||||||
set -e
|
set -e
|
||||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||||
@ -63,22 +82,22 @@ pushd $TEMP_DIR >/dev/null
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "⚠ User exited script \n" && exit
|
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${HOLD} ${YW}${msg}..."
|
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_ok() {
|
function msg_ok() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_error() {
|
function msg_error() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_root() {
|
function check_root() {
|
||||||
@ -93,17 +112,18 @@ function check_root() {
|
|||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function arch_check() {
|
function arch_check() {
|
||||||
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
||||||
msg_error "This script will not work with PiMox! \n"
|
echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
|
||||||
|
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
@ -125,7 +145,7 @@ function ssh_check() {
|
|||||||
|
|
||||||
function exit-script() {
|
function exit-script() {
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +153,7 @@ function default_settings() {
|
|||||||
VMID="$NEXTID"
|
VMID="$NEXTID"
|
||||||
FORMAT=",efitype=4m"
|
FORMAT=",efitype=4m"
|
||||||
MACHINE=""
|
MACHINE=""
|
||||||
|
DISK_SIZE="8G"
|
||||||
DISK_CACHE=""
|
DISK_CACHE=""
|
||||||
HN="debian"
|
HN="debian"
|
||||||
CPU_TYPE=""
|
CPU_TYPE=""
|
||||||
@ -143,19 +164,20 @@ function default_settings() {
|
|||||||
VLAN=""
|
VLAN=""
|
||||||
MTU=""
|
MTU=""
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}"
|
||||||
echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}"
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||||
echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}"
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
|
||||||
echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}${HN}${CL}"
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}"
|
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}${CL}"
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}${MAC}${CL}"
|
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}${BRG}${CL}"
|
||||||
echo -e "${DGN}Using VLAN: ${BGN}Default${CL}"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}${MAC}${CL}"
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}"
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}Default${CL}"
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
|
||||||
echo -e "${BL}Creating a Debian 12 VM using the above default settings${CL}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
echo -e "${CREATING}${BOLD}${DGN}Creating a Debian 12 VM using the above default settings${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
@ -169,7 +191,7 @@ function advanced_settings() {
|
|||||||
sleep 2
|
sleep 2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -181,27 +203,42 @@ function advanced_settings() {
|
|||||||
"q35" "Machine q35" OFF \
|
"q35" "Machine q35" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ $MACH = q35 ]; then
|
if [ $MACH = q35 ]; then
|
||||||
echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}"
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||||
FORMAT=""
|
FORMAT=""
|
||||||
MACHINE=" -machine q35"
|
MACHINE=" -machine q35"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}"
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||||
FORMAT=",efitype=4m"
|
FORMAT=",efitype=4m"
|
||||||
MACHINE=""
|
MACHINE=""
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GiB (e.g., 10, 20)" 8 58 "$DISK_SIZE" --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
|
DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
|
||||||
|
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
|
||||||
|
DISK_SIZE="${DISK_SIZE}G"
|
||||||
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||||
|
elif [[ "$DISK_SIZE" =~ ^[0-9]+G$ ]]; then
|
||||||
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||||
|
else
|
||||||
|
echo -e "${DISKSIZE}${BOLD}${RD}Invalid Disk Size. Please use a number (e.g., 10 or 10G).${CL}"
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||||
"0" "None (Default)" ON \
|
"0" "None (Default)" ON \
|
||||||
"1" "Write Through" OFF \
|
"1" "Write Through" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ $DISK_CACHE = "1" ]; then
|
if [ $DISK_CACHE = "1" ]; then
|
||||||
echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}Write Through${CL}"
|
||||||
DISK_CACHE="cache=writethrough,"
|
DISK_CACHE="cache=writethrough,"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
|
||||||
DISK_CACHE=""
|
DISK_CACHE=""
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -211,10 +248,10 @@ function advanced_settings() {
|
|||||||
if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 debian --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 debian --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
HN="debian"
|
HN="debian"
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -225,10 +262,10 @@ function advanced_settings() {
|
|||||||
"1" "Host" OFF \
|
"1" "Host" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ $CPU_TYPE1 = "1" ]; then
|
if [ $CPU_TYPE1 = "1" ]; then
|
||||||
echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}"
|
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}"
|
||||||
CPU_TYPE=" -cpu host"
|
CPU_TYPE=" -cpu host"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}"
|
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||||
CPU_TYPE=""
|
CPU_TYPE=""
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -238,9 +275,9 @@ function advanced_settings() {
|
|||||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $CORE_COUNT ]; then
|
if [ -z $CORE_COUNT ]; then
|
||||||
CORE_COUNT="2"
|
CORE_COUNT="2"
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -249,9 +286,9 @@ function advanced_settings() {
|
|||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $RAM_SIZE ]; then
|
if [ -z $RAM_SIZE ]; then
|
||||||
RAM_SIZE="2048"
|
RAM_SIZE="2048"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -260,9 +297,9 @@ function advanced_settings() {
|
|||||||
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $BRG ]; then
|
if [ -z $BRG ]; then
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -271,10 +308,10 @@ function advanced_settings() {
|
|||||||
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MAC1 ]; then
|
if [ -z $MAC1 ]; then
|
||||||
MAC="$GEN_MAC"
|
MAC="$GEN_MAC"
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
else
|
else
|
||||||
MAC="$MAC1"
|
MAC="$MAC1"
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -284,10 +321,10 @@ function advanced_settings() {
|
|||||||
if [ -z $VLAN1 ]; then
|
if [ -z $VLAN1 ]; then
|
||||||
VLAN1="Default"
|
VLAN1="Default"
|
||||||
VLAN=""
|
VLAN=""
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
else
|
else
|
||||||
VLAN=",tag=$VLAN1"
|
VLAN=",tag=$VLAN1"
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
@ -297,28 +334,28 @@ function advanced_settings() {
|
|||||||
if [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
MTU1="Default"
|
MTU1="Default"
|
||||||
MTU=""
|
MTU=""
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
else
|
else
|
||||||
MTU=",mtu=$MTU1"
|
MTU=",mtu=$MTU1"
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}no${CL}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}no${CL}"
|
||||||
START_VM="no"
|
START_VM="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Debian 12 VM?" --no-button Do-Over 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Debian 12 VM?" --no-button Do-Over 10 58); then
|
||||||
echo -e "${RD}Creating a Debian 12 VM using the above advanced settings${CL}"
|
echo -e "${CREATING}${BOLD}${DGN}Creating a Debian 12 VM using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
header_info
|
header_info
|
||||||
echo -e "${RD}Using Advanced Settings${CL}"
|
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||||
advanced_settings
|
advanced_settings
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -326,11 +363,11 @@ function advanced_settings() {
|
|||||||
function start_script() {
|
function start_script() {
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
|
||||||
default_settings
|
default_settings
|
||||||
else
|
else
|
||||||
header_info
|
header_info
|
||||||
echo -e "${RD}Using Advanced Settings${CL}"
|
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||||
advanced_settings
|
advanced_settings
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -402,16 +439,16 @@ done
|
|||||||
|
|
||||||
msg_info "Creating a Debian 12 VM"
|
msg_info "Creating a Debian 12 VM"
|
||||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||||
-name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
||||||
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
||||||
qm set $VMID \
|
qm set $VMID \
|
||||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||||
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
|
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=${DISK_SIZE} \
|
||||||
-boot order=scsi0 \
|
-boot order=scsi0 \
|
||||||
-serial0 socket >/dev/null
|
-serial0 socket >/dev/null
|
||||||
qm resize $VMID scsi0 4G >/dev/null
|
DESCRIPTION=$(
|
||||||
DESCRIPTION=$(cat <<EOF
|
cat <<EOF
|
||||||
<div align='center'>
|
<div align='center'>
|
||||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||||
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||||
@ -440,13 +477,21 @@ qm resize $VMID scsi0 4G >/dev/null
|
|||||||
</div>
|
</div>
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
|
if [ -n "$DISK_SIZE" ]; then
|
||||||
|
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||||
|
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||||
|
else
|
||||||
|
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||||
|
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})"
|
msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})"
|
||||||
if [ "$START_VM" == "yes" ]; then
|
if [ "$START_VM" == "yes" ]; then
|
||||||
msg_info "Starting Debian 12 VM"
|
msg_info "Starting Debian 12 VM"
|
||||||
qm start $VMID
|
qm start $VMID
|
||||||
msg_ok "Started Debian 12 VM"
|
msg_ok "Started Debian 12 VM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo "More Info at https://github.com/community-scripts/ProxmoxVE/discussions/836"
|
echo "More Info at https://github.com/community-scripts/ProxmoxVE/discussions/836"
|
||||||
|
Loading…
Reference in New Issue
Block a user