forked from ich777/unraid-nvtop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvtop.plg
94 lines (74 loc) · 2.58 KB
/
nvtop.plg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "nvtop">
<!ENTITY author "ich777">
<!ENTITY version "2022.11.06">
<!ENTITY gitURL "https://github.com/&author;/unraid-&name;/releases/download">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&author;/unraid-&name;/master/&name;.plg">
<!ENTITY md5 "3eb58eb76e2e70f53fca0626dd31dbb8">
<!ENTITY plugin "/boot/config/plugins/&name;">
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="6.9.0" support="https://forums.unraid.net/topic/98978-plugin-nvidia-driver/">
<CHANGES>
###2022.10.02
- Bumped version - based on NVTOP v3.0.1
###2022.10.02
- Bumped version - based on NVTOP v2.0.4
###2022.08.26
- Bumped version - based on NVTOP v2.0.3
###2022.06.11
- Bumped version - based on NVTOP v2.0.2
###2022.04.18
- Bumped version - based on NVTOP v2.0.1
###2021.12.13
- Added exit status if Nvidia Driver plugin is not found - thank you for the heads up Squid
###2021.09.28
- Initial release based on NVTOP v1.2.2
</CHANGES>
<FILE Run="/bin/bash">
<INLINE>
rm -f $(ls /boot/config/plugins/&name;/&name;*.tgz 2>/dev/null|grep -v '&version;')
</INLINE>
</FILE>
<FILE Name="/boot/config/plugins/&name;/&name;-&version;.tgz" Run="upgradepkg --install-new">
<URL>&gitURL;/&version;/&name;-&version;.tgz</URL>
<MD5>&md5;</MD5>
</FILE>
<FILE Name="&emhttp;/README.md">
<INLINE>
**NVTOP**
Nvtop stands for NVidia TOP, a (h)top like task monitor for NVIDIA GPUs for the CLI. It can handle multiple GPUs and print information about them in a htop familiar way.
This Plugin is based on: https://github.com/Syllo/nvtop
</INLINE>
</FILE>
<FILE Run="/bin/bash">
<INLINE>
if [ ! -d /boot/config/plugins/nvidia-driver ]; then
echo "---ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR ---"
echo "---Nvidia Driver plugin not found, please install the Nvidia Driver plugin first!---"
echo "---ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR ---"
removepkg &name;-&version; 2>/dev/null
rm -rf &emhttp;
rm -rf &plugin;
exit 1
fi
</INLINE>
</FILE>
<FILE Run="/bin/bash" Method="remove">
<INLINE>
echo "------------------------"
echo "---Uninstalling NVTOP---"
echo "------------------------"
# Remove plugin related files
removepkg &name;-&version;
rm -rf &emhttp;
rm -rf &plugin;
echo
echo "---------------------------------------"
echo "---Uninstallation of NVTOP complete!---"
echo "---------------------------------------"
echo
</INLINE>
</FILE>
</PLUGIN>