mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-11 02:09:17 +00:00
Compare commits
6 Commits
dac521c6a3
...
72bee44543
Author | SHA1 | Date | |
---|---|---|---|
|
72bee44543 | ||
|
3ef3718056 | ||
|
f7adce2fda | ||
|
612f41afdd | ||
|
2c07496638 | ||
|
873c78bfd8 |
@ -65,7 +65,7 @@ For detailed instructions, check out our [official guides](https://github.com/co
|
||||
|
||||
The Proxmox Helper Scripts project is community-driven, and we highly appreciate any contributions — whether it's through reporting bugs, suggesting features, improving documentation, or spreading the word. We are committed to maintaining transparency and sustainability in this open-source effort.
|
||||
|
||||
### 💖 Donate to Support the Project (DRAFT)
|
||||
### 💖 Donate to Support the Project
|
||||
|
||||
We offer two donation options to help maintain and grow this project:
|
||||
|
||||
|
@ -52,35 +52,10 @@ function default_settings() {
|
||||
VERB="no"
|
||||
echo_default
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
|
||||
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
|
||||
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
|
||||
fi
|
||||
wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz
|
||||
msg_info "Stopping AdguardHome"
|
||||
systemctl stop AdGuardHome
|
||||
msg_ok "Stopped AdguardHome"
|
||||
|
||||
msg_info "Updating AdguardHome"
|
||||
tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null
|
||||
mkdir -p adguard-backup
|
||||
cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/
|
||||
cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome
|
||||
cp -r adguard-backup/* /opt/AdGuardHome/
|
||||
msg_ok "Updated AdguardHome"
|
||||
|
||||
msg_info "Starting AdguardHome"
|
||||
systemctl start AdGuardHome
|
||||
msg_ok "Started AdguardHome"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
msg_error "Adguard Home should be updated via the user interface."
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,26 @@
|
||||
import TextCopyBlock from "@/components/TextCopyBlock";
|
||||
import { AlertColors } from "@/config/siteConfig";
|
||||
import { Script } from "@/lib/types";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Info } from "lucide-react";
|
||||
|
||||
type NoteProps = {
|
||||
text: string;
|
||||
type: keyof typeof AlertColors;
|
||||
}
|
||||
|
||||
export default function Alerts({ item }: { item: Script }) {
|
||||
return (
|
||||
<>
|
||||
{item?.notes?.length > 0 &&
|
||||
item.notes.map((note: any, index: number) => (
|
||||
item.notes.map((note: NoteProps, index: number) => (
|
||||
<div key={index} className="mt-4 flex flex-col gap-2">
|
||||
<p className="inline-flex items-center gap-2 rounded-lg border border-red-500/25 bg-destructive/25 p-2 pl-4 text-sm">
|
||||
<p
|
||||
className={cn(
|
||||
"inline-flex items-center gap-2 rounded-lg border p-2 pl-4 text-sm",
|
||||
AlertColors[note.type],
|
||||
)}
|
||||
>
|
||||
<Info className="h-4 min-h-4 w-4 min-w-4" />
|
||||
<span>{TextCopyBlock(note.text)}</span>
|
||||
</p>
|
||||
|
@ -34,3 +34,10 @@ export const analytics = {
|
||||
url: "analytics.proxmoxve-scripts.com",
|
||||
token: "b60d3032-1a11-4244-a100-81d26c5c49a7",
|
||||
};
|
||||
|
||||
export const AlertColors = {
|
||||
warning:
|
||||
"border-yellow-400 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-900",
|
||||
danger: "border-red-500/25 bg-destructive/25",
|
||||
info: "border-cyan-500/25 bg-cyan-50 dark:border-cyan-900/25 dark:bg-cyan-900",
|
||||
};
|
@ -1,3 +1,5 @@
|
||||
import { AlertColors } from "@/config/siteConfig";
|
||||
|
||||
export type Script = {
|
||||
name: string;
|
||||
slug: string;
|
||||
@ -29,7 +31,7 @@ export type Script = {
|
||||
notes: [
|
||||
{
|
||||
text: string;
|
||||
type: string;
|
||||
type: keyof typeof AlertColors;
|
||||
},
|
||||
];
|
||||
};
|
||||
|
@ -30,5 +30,10 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
"notes": [
|
||||
{
|
||||
"text": "Adguard Home can be updated via the user interface.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user