This commit is contained in:
MacRimi 2025-03-02 11:37:30 +01:00
parent a221beccc7
commit 8c4b9644fc

View File

@ -71,7 +71,7 @@ export default function CustomizationSettingsPage() {
code={`
# Add custom configurations to .bashrc
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> /root/.bashrc
echo 'export PS1="\\[\\e[31m\\][\\[\\e[m\\]\\[\\e[38;5;172m\\]\\u\\[\\e[m\\]@\\[\\e[38;5;153m\\]\\h\\[\\e[m\\] \\[\\e[38;5;214m\\]\\W\\[\\e[m\\]\\[\\e[31m\\]]\\[\\e[m\\]\\$ "' >> /root/.bashrc
echo 'export PS1="[\u@\h \W]\\$ "' >> /root/.bashrc
echo "alias l='ls -CF'" >> /root/.bashrc
echo "alias la='ls -A'" >> /root/.bashrc
echo "alias ll='ls -alF'" >> /root/.bashrc
@ -103,7 +103,7 @@ echo "source /root/.bashrc" >> /root/.bash_profile
<CopyableCode
code={`
# Create cron job for banner removal
cat <<'EOF' > /etc/cron.daily/xs-pve-nosub
cat <<EOF > /etc/cron.daily/xs-pve-nosub
#!/bin/sh
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
@ -111,7 +111,7 @@ EOF
chmod 755 /etc/cron.daily/xs-pve-nosub
# Create APT hook for nag removal
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 { "sed -i '/data.status/s/!//;s/Active/NoMoreNagging/' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"; };' > /etc/apt/apt.conf.d/xs-pve-no-nag
# Apply changes immediately
apt-get --reinstall install proxmox-widget-toolkit
@ -138,8 +138,8 @@ apt-get --reinstall install proxmox-widget-toolkit
# Add custom message to MOTD
custom_message="This system is optimised by: ProxMenux"
cp /etc/motd /etc/motd.bak
echo -e "$custom_message\\n\\n$(cat /etc/motd)" > /etc/motd
sed -i '/^$/N;/^\\n$/D' /etc/motd
echo -e "$custom_message\n\n$(cat /etc/motd)" > /etc/motd
sed -i '/^$/N;/^\n$/D' /etc/motd
`}
/>