Skip to content

Instantly share code, notes, and snippets.

@Zoddo
Last active August 2, 2023 15:37
Show Gist options
  • Save Zoddo/828c66e46b0d6ae0d70da24e4149e391 to your computer and use it in GitHub Desktop.
Save Zoddo/828c66e46b0d6ae0d70da24e4149e391 to your computer and use it in GitHub Desktop.
--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2020-06-30 13:36:05.000000000 +0200
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js-new 2020-07-12 12:43:34.704855306 +0200
@@ -450,6 +450,9 @@
},
checked_command: function(orig_cmd) {
+ orig_cmd();
+ return; // Neutralize the API request
+
Proxmox.Utils.API2Request(
{
url: '/nodes/localhost/subscription',
@Zoddo
Copy link
Author

Zoddo commented Jul 12, 2020

You can apply it with this one-liner:

curl https://gist.githubusercontent.com/Zoddo/828c66e46b0d6ae0d70da24e4149e391/raw/cb18ba255f35b7582e9ce4f122dcc175764419d5/proxmox-disable-subscription-popup.patch | patch -p0 -d /

If you want, you can apply it automatically on reboot or on whatever event happens by executing this bash command (it detect if the patch is already applied):

patch -p0 -d / -N -r - < proxmox-disable-subscription-popup.patch

@Xenthys
Copy link

Xenthys commented Jul 19, 2020

#!/bin/bash

read -r -d '' PATCH << EOF
--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js	2020-06-30 13:36:05.000000000 +0200
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js-new	2020-07-12 12:43:34.704855306 +0200
@@ -450,6 +450,9 @@
     },
 
     checked_command: function(orig_cmd) {
+	orig_cmd();
+	return; // Neutralize the API request
+
 	Proxmox.Utils.API2Request(
 	    {
		url: '/nodes/localhost/subscription',
EOF

echo "$PATCH" | patch -p0 -d / -N -r -

service pveproxy restart
echo 'Patch successfully applied!'

Edited by @Zoddo on 16/04/2021 to includes changes for last versions

@Zoddo
Copy link
Author

Zoddo commented Apr 16, 2021

Updated patch file for last versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment