Merge pull request #26 from Meliox/integration-eremem
Rephrase thermal references to sensor-related
This commit is contained in:
commit
03da3ce41f
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This bash script installs a modification to the Proxmox Virtual Environment (PVE) web user interface (UI) to display temperature information.
|
||||
# This bash script installs a modification to the Proxmox Virtual Environment (PVE) web user interface (UI) to display sensors information.
|
||||
#
|
||||
|
||||
################### Configuration #############
|
||||
@ -183,15 +183,15 @@ function install_mod {
|
||||
local timestamp=$(date '+%Y-%m-%d_%H-%M-%S')
|
||||
|
||||
# Add new line to Nodes.pm file
|
||||
if [[ -z $(cat $nodespm | grep -e "$res->{thermalstate}") ]]; then
|
||||
if [[ -z $(cat $nodespm | grep -e "$res->{sensorsOutput}") ]]; then
|
||||
# Create backup of original file
|
||||
cp "$nodespm" "$BACKUP_DIR/Nodes.pm.$timestamp"
|
||||
msg "Backup of \"$nodespm\" saved to \"$BACKUP_DIR/Nodes.pm.$timestamp\"."
|
||||
|
||||
sed -i '/my $dinfo = df('\''\/'\'', 1);/i\'$'\t''$res->{thermalstate} = `sensors -j`;\n' "$nodespm"
|
||||
msg "Added thermalstate to $nodespm."
|
||||
sed -i '/my $dinfo = df('\''\/'\'', 1);/i\'$'\t''$res->{sensorsOutput} = `sensors -j`;\n' "$nodespm"
|
||||
msg "Sensors' output added to \"$nodespm\"."
|
||||
else
|
||||
warn "Thermalstate already added to \"$nodespm\"."
|
||||
warn "Sensors' output already integrated in in \"$nodespm\"."
|
||||
fi
|
||||
|
||||
# Add new item to the items array in PVE.node.StatusView
|
||||
@ -221,7 +221,7 @@ function install_mod {
|
||||
printBar: false,\n\
|
||||
title: gettext('CPU Thermal State'),\n\
|
||||
iconCls: 'fa fa-fw fa-thermometer-half',\n\
|
||||
textField: 'thermalstate',\n\
|
||||
textField: 'sensorsOutput',\n\
|
||||
renderer: function(value){\n\
|
||||
// sensors configuration\n\
|
||||
const cpuAddress = \"$CPU_ADDRESS\";\n\
|
||||
@ -278,7 +278,7 @@ function install_mod {
|
||||
printBar: false,\n\
|
||||
title: gettext('HDD/SSD Thermal State'),\n\
|
||||
iconCls: 'fa fa-fw fa-thermometer-half',\n\
|
||||
textField: 'thermalstate',\n\
|
||||
textField: 'sensorsOutput',\n\
|
||||
renderer: function(value) {\n\
|
||||
// sensors configuration\n\
|
||||
const addressPrefix = \"drivetemp-scsi-\";\n\
|
||||
@ -320,7 +320,7 @@ function install_mod {
|
||||
printBar: false,\n\
|
||||
title: gettext('NVMe Thermal State'),\n\
|
||||
iconCls: 'fa fa-fw fa-thermometer-half',\n\
|
||||
textField: 'thermalstate',\n\
|
||||
textField: 'sensorsOutput',\n\
|
||||
renderer: function(value) {\n\
|
||||
// sensors configuration\n\
|
||||
const addressPrefix = \"nvme-pci-\";\n\
|
||||
@ -475,13 +475,13 @@ function install_mod {
|
||||
s/nodeStatus/\/\/nodeStatus/
|
||||
}" "$pvemanagerlibjs"
|
||||
|
||||
msg "New information display items added to the summary panel in \"$pvemanagerlibjs\"."
|
||||
msg "Sensor display items added to the summary panel in \"$pvemanagerlibjs\"."
|
||||
|
||||
restart_proxy
|
||||
|
||||
msg "Installation completed"
|
||||
else
|
||||
warn "New temperature display items already added to the summary panel in \"$pvemanagerlibjs\"."
|
||||
warn "Sensor display items already added to the summary panel in \"$pvemanagerlibjs\"."
|
||||
fi
|
||||
}
|
||||
|
||||
@ -528,14 +528,14 @@ while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
install)
|
||||
executed=$(($executed + 1))
|
||||
msgb "\nInstalling the Proxmox VE temperatures display mod..."
|
||||
msgb "\nInstalling the Proxmox VE sensors display mod..."
|
||||
install_packages
|
||||
install_mod
|
||||
echo # add a new line
|
||||
;;
|
||||
uninstall)
|
||||
executed=$(($executed + 1))
|
||||
msgb "\nUninstalling the Proxmox VE temperatures display mod..."
|
||||
msgb "\nUninstalling the Proxmox VE sensors display mod..."
|
||||
uninstall_mod
|
||||
echo # add a new line
|
||||
;;
|
||||
|
||||
@ -4,7 +4,7 @@ A small collection of script and mods for Proxmox
|
||||
If you find this helpful, a small donation is appreciated, [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K8XPMSEBERH3W).
|
||||
|
||||
## Node temperature view
|
||||
(Tested compatibility: 7.x, 8.0.x, 8.1.x)
|
||||
(Tested compatibility: 7.x, 8.0.x, 8.1.x, 8.2.x)
|
||||
|
||||
This bash script installs a modification to the Proxmox Virtual Environment (PVE) web user interface (UI) to display temperature information in a flexible manner for CPU, NVME and HDDs/SSDs. Fanspeeds are also displayed, if available.
|
||||
|
||||
@ -30,7 +30,7 @@ Or use git clone.
|
||||
Adjustments are available in the first part of the script, where paths can be edited, cpucore offset and display information.
|
||||
|
||||
## Nag screen deactivation
|
||||
(Tested compatibility: 7.x, 8.0.x, 8.1.x)
|
||||
(Tested compatibility: 7.x, 8.0.x, 8.1.x, 8.2.x)
|
||||
This bash script installs a modification to the Proxmox Virtual Environment (PVE) web user interface (UI) which deactivates the subscription nag screen.
|
||||
|
||||
The script provides two options: `install` and `uninstall`. The `install` option installs the modification, while the `uninstall` option removes it by copying the backup files to their original location.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user