Customizations to Proxmox VE 6.0 Persistent

This document worked for VE 7.X edition too.

Preparation

First, we’ll create a directory where we’ll store our customizations (you can call it whatever you want, as long as you are consistent across the commands):

$ sudo mkdir /usr/share/custom

Next, create the script which will apply the customizations and make it executable:

$ sudo echo '#!/usr/bin/env bash' > /usr/share/custom/apply.sh
$ sudo chmod a+x /usr/share/custom/apply.sh

Create the Hook

Finally, create a file telling apt to execute the script after being invoked:

$ sudo echo 'DPkg::Post-Invoke { "/usr/share/custom/apply.sh"; };' > /etc/apt/apt.conf.d/90custom

Now /usr/share/custom/apply.sh will be executed when apt installs or upgrades a package, reapplying the customizations. Be careful of what you put in there, though!

Read more

Share