This commit is contained in:
MacRimi 2025-03-06 22:52:55 +01:00
parent 85b78a97b8
commit 301975e383
2 changed files with 39 additions and 29 deletions

View File

@ -2450,6 +2450,7 @@ for index in "${!sorted_options[@]}"; do
/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' autoclean >/dev/null 2>&1
msg_ok "$(translate "Cleanup finished")"
msg_info2 "$(translate "You can reboot later manually.")"
exit 0
fi
fi

View File

@ -1,6 +1,5 @@
import type { Metadata } from "next"
import { Sliders } from "lucide-react"
import CopyableCode from "@/components/CopyableCode"
export const metadata: Metadata = {
title: "ProxMenux Post-Install: Customization Settings",
@ -46,7 +45,8 @@ export default function CustomizationSettingsPage() {
<h1 className="text-3xl font-bold">Customization Settings</h1>
</div>
<p className="mb-4">
The <strong>Customization Settings</strong> section allows you to configure and personalize the Proxmox VE environment with specific adjustments.
The <strong>Customization Settings</strong> section allows you to configure and personalize the Proxmox VE
environment with specific adjustments.
</p>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
@ -54,19 +54,26 @@ export default function CustomizationSettingsPage() {
Customize Bash Prompt and Aliases
</h3>
<p className="mb-4">
This option modifies the root user's <code>.bashrc</code> to enhance command-line usability by adding colorized prompts and useful aliases.
This option modifies the root user's <code>.bashrc</code> to enhance command-line usability by adding colorized
prompts and useful aliases.
</p>
<p className="mb-4">What it does:</p>
<ul className="list-disc pl-5 mb-4">
<li>Backs up the original <code>.bashrc</code> file</li>
<li>
Backs up the original <code>.bashrc</code> file
</li>
<li>Configures a custom prompt with timestamp</li>
<li>Adds colorized <code>ls</code> and <code>grep</code> aliases</li>
<li>Ensures <code>.bashrc</code> is sourced in <code>.bash_profile</code></li>
<li>
Adds colorized <code>ls</code> and <code>grep</code> aliases
</li>
<li>
Ensures <code>.bashrc</code> is sourced in <code>.bash_profile</code>
</li>
</ul>
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
<CopyableCode
code={`
# Modify .bashrc for root
<div className="bg-gray-800 text-white p-4 rounded-md overflow-x-auto mb-6">
<pre className="whitespace-pre-wrap">
{`# Modify .bashrc for root
cp /root/.bashrc /root/.bashrc.bak
sed -i '/HISTTIMEFORMAT/d' /root/.bashrc
sed -i '/PS1/d' /root/.bashrc
@ -75,26 +82,24 @@ sed -i '/alias/d' /root/.bashrc
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> /root/.bashrc
echo 'export PS1="\\u@\\h:\\W \\\$ "' >> /root/.bashrc
echo "alias ll='ls -alF'" >> /root/.bashrc
source /root/.bashrc
`}
/>
source /root/.bashrc`}
</pre>
</div>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={2} />
Configure MOTD (Message of the Day)
</h3>
<p className="mb-4">
This option customizes the MOTD to display a ProxMenux optimization message upon login.
</p>
<p className="mb-4">This option customizes the MOTD to display a ProxMenux optimization message upon login.</p>
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
<CopyableCode
code={`
# Backup original MOTD
<div className="bg-gray-800 text-white p-4 rounded-md overflow-x-auto mb-6">
<pre className="whitespace-pre-wrap">
{`# Backup original MOTD
cp /etc/motd /etc/motd.bak
echo "This system is optimized by: ProxMenux" | cat - /etc/motd > temp && mv temp /etc/motd
`}
/>
echo "This system is optimized by: ProxMenux" | cat - /etc/motd > temp && mv temp /etc/motd`}
</pre>
</div>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={3} />
@ -105,27 +110,31 @@ echo "This system is optimized by: ProxMenux" | cat - /etc/motd > temp && mv tem
</p>
<p className="mb-4">What it does:</p>
<ul className="list-disc pl-5 mb-4">
<li>Patches <code>proxmoxlib.js</code> to disable banner checks</li>
<li>
Patches <code>proxmoxlib.js</code> to disable banner checks
</li>
<li>Creates a cron job to ensure banner removal persists</li>
<li>Configures APT to prevent nagging messages</li>
</ul>
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
<CopyableCode
code={`
# Remove Proxmox subscription banner
<div className="bg-gray-800 text-white p-4 rounded-md overflow-x-auto mb-6">
<pre className="whitespace-pre-wrap">
{`# Remove Proxmox subscription banner
sed -i "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
sed -i "s/checked_command: function(orig_cmd) {/checked_command: function() {} || function(orig_cmd) {/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\\.js$'; if [ $\? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!/\!/;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/xs-pve-no-nag
`}
/>
echo "DPkg::Post-Invoke { \\"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\\\\.js$'; if [ $\\? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\\!/\\!/;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\\"; };" > /etc/apt/apt.conf.d/xs-pve-no-nag`}
</pre>
</div>
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">Customization Application</h2>
<p>
These customization settings are applied automatically when selected in the post-install process. Adjustments can be made manually as needed.
These customization settings are applied automatically when selected in the post-install process. Adjustments
can be made manually as needed.
</p>
</section>
</div>
)
}