Unraid-SlackPack/plugins/speedtest.plg

289 lines
7.8 KiB
Plaintext
Raw Normal View History

2015-12-11 03:54:56 +00:00
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "speedtest">
<!ENTITY author "dmacias72">
2017-02-13 14:05:29 +00:00
<!ENTITY version "2017.02.13">
2017-02-12 19:52:45 +00:00
<!ENTITY launch "Settings/SpeedtestSettingsTabs">
2015-12-11 18:56:18 +00:00
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
2015-12-11 03:54:56 +00:00
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
2016-09-16 20:39:44 +00:00
<!ENTITY pkgURL "&gitURL;/source/packages">
<!ENTITY pkgs "/boot/packages">
2016-10-10 00:16:00 +00:00
<!ENTITY plgPATH "/boot/config/plugins/&name;">
<!ENTITY plgNAME "&name;-&version;-x86_64-1">
2016-09-16 20:39:44 +00:00
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
2015-12-11 03:54:56 +00:00
]>
<PLUGIN name="&name;" author="&author;" launch="&launch;" version="&version;" pluginURL="&pluginURL;">
<!--
This Plugin installs speedtest-cli for unRaid 6.1 All dependencies are installed as needed and is controlable from the webgui.
-->
<CHANGES>
2016-10-23 02:00:39 +00:00
##&name;
###&version;
2017-02-13 14:05:29 +00:00
- version bump
###2017.02.12a
2017-02-12 18:17:17 +00:00
- fix scheduler hourly setting
- fix scheduler tab calculation
###2017.01.30
2017-01-30 07:50:12 +00:00
- update python to 2.7.13
- add support link to readme
###2017.01.27
- more code for XSS and CSRF vulnerabilities
2017-01-27 20:39:05 +00:00
###2017.01.23
- remove local tablesorter
2017-01-24 05:01:21 +00:00
- move js depends to cdn
- add sivel version 1.0.2
2017-01-29 04:14:05 +00:00
- harden code for XSS and CSRF vulnerabilities
2017-01-24 05:01:21 +00:00
###2017.01.07
2017-01-08 06:24:13 +00:00
- update scripts
- add support for speedtest-linux script
- fix deleting single result
###2016.11.04
2016-11-04 18:45:37 +00:00
- fix: python min
###2016.10.28
2016-10-28 11:55:43 +00:00
- update min/max version
###2016.10.15
2016-10-15 17:32:07 +00:00
- update speedtest-linux to 1.0.2-c
2016-10-10 00:18:47 +00:00
###2016.10.09a
2016-10-09 23:41:46 +00:00
- update for 6.3
2016-09-16 16:34:03 +00:00
###2016.09.16
- update python to 2.7.12
- update tablesorter to 2.27.6
2016-06-19 13:49:54 +00:00
###2016.06.19
- fix: scheduler not saving changes
2016-06-10 13:39:21 +00:00
###2016.06.10
- fix: make schedule variables unique, so other schedules aren't affected
2016-06-08 07:22:48 +00:00
###2016.06.08
- fix: getting no results because script version 0.3.1 missing timeout option
2016-06-04 18:16:43 +00:00
###2016.06.04
- fix: history table css
2016-06-03 19:16:06 +00:00
###2016.06.03
- add: selectable versions of speedtest-cli
- add: timeout option for those getting 0 values
- move and revise manual list to server side
2016-05-22 05:24:33 +00:00
###2016.05.22
- fix: units error when using bytes
- fix: increase chart size and remove horizontal title so date labels show correctly.
- add: extra speedtest scripts (speedtest-cli and speedtest-linux)
2016-05-21 16:59:09 +00:00
###2016.05.21
- fix: fix scheduler tab count if no mover settings
- fix: blank image not showing with empty table
2016-05-20 14:03:43 +00:00
###2016.05.20
- fix: workaround for dynamix plugin update api not refreshing after update (remove update message)
- fix: change chart sort order
- fix: streamline code
2016-05-15 23:38:11 +00:00
###2016.05.15
- fix: tabs not working due to image path
2016-05-07 00:47:49 +00:00
###2016.05.06
2016-05-15 23:38:11 +00:00
- add: tabs for settings, scheduler and history
- add: dynamix plugin update api
- add: help info
2016-03-14 06:35:32 +00:00
###2016.03.14
- update package locations
2016-03-12 09:07:14 +00:00
###2016.03.12
2016-05-15 23:38:11 +00:00
- fix: install python 2.7.11 for unRAID 6.2+
- fix: install python 2.7.9 for unRAID 6.1
2016-02-28 09:31:40 +00:00
###2016.02.28
- fix: chart and table sync on changes
- fix: filters save
- fix: page refresh after manual test
2016-09-16 20:39:44 +00:00
- fix: various minor css and code
2016-02-28 09:31:40 +00:00
- add settings icon
- removed stacked charts
- add: persistent chart selection cookie
- tested working on clean install OSX 10.11 and Safari 9.0
- tested working on upgrade to OSX 10.11.3 and Safari 9.03
2016-02-25 06:24:57 +00:00
###2016.02.25
- fix: chart filter cookie
- fix: after deletion of row next image not shown
2016-02-24 19:28:36 +00:00
###2016.02.24
- add modified speedtest.py script
- remove obsolete dependencies from plugin install
- fix share image function hopefully for Safari
- add scheduler and history button to settings page
2016-02-23 16:09:43 +00:00
###2016.02.23
- update packages to NerdPack versions
2016-02-21 23:37:26 +00:00
###2016.02.21
- add save chart type to cookie
- add save chart data type cookie
- move row click to table column click
2016-02-14 09:56:20 +00:00
###2016.02.14
- fix: move delete all outside icon tag
- fix: no quotes on table row id
- add: animation to table row delete
- move: tablesorter to document ready
- add: function to save filters on page refresh
- add: charts: line, area, vertical, horizontal
- date format to fixed yyyy-mm-dd hh:mm day for sorting and charts
- update tablesorter
2016-01-18 02:41:30 +00:00
###2016.01.17
- remove symlink to speedtest-linux
2016-01-16 20:49:49 +00:00
###2016.01.16
- minor diplay changes
- add tablesorter as a separate package
2016-01-15 08:48:05 +00:00
###2016.01.15
- fix filter save
- add filter reset button
- add speedtest-linux command
2016-01-12 22:27:34 +00:00
###2016.01.12
- add checks for failed speedtest
2016-01-03 00:18:09 +00:00
###2016.01.02
- added tablesorter pager plugin
- fix tablesort css padding
- click on row to show share image
- save sort and filter settings
- added default cfg
2015-12-30 02:31:55 +00:00
###2015.12.29
2016-09-16 20:39:44 +00:00
- update tablesorter to v2.25.0 combined
2015-12-30 02:31:55 +00:00
- add tablesorter filters to table
- save speedtest host server
- add shadow box display when running speedtest
2015-12-21 00:45:00 +00:00
###2015.12.20a
- Added cron settings page
- Separated into proper webgui locations
- Speedtest settings under Settings
- Speedtest Cron Settings under Settings/Scheduler
- Speedtest App under Tools/Speedtest
2015-12-20 17:07:44 +00:00
###2015.12.20
2016-09-16 20:39:44 +00:00
- added speedtest-xml script to /usr/sbin/ for cron jobs
2015-12-20 17:07:44 +00:00
- added logging to speedtest.php for start and completion of the script
2015-12-20 08:58:44 +00:00
###2015.12.19
- changed icon thanks to hernandito
- convert to stand alone script for cron jobs
- rearrange setting page layout
- one click remove
2015-12-11 21:09:42 +00:00
###2015.12.11c
2015-12-11 17:07:55 +00:00
- update package name
2015-12-11 05:00:27 +00:00
- update install and remove scripts
2015-12-11 17:07:55 +00:00
###2015.12.10
2015-12-11 03:54:56 +00:00
- add date and time to table
- add switchbuttons
- update packages
###2015.10.19
- typos
###2015.10.18b
- update to python 2.7.9
###2015.10.18a
- update install script
###2015.10.17
- initial commit
</CHANGES>
2017-02-01 12:51:12 +00:00
<FILE Name="&plgPATH;/python-2.7.13-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2017-01-30 07:57:43 +00:00
<URL>&gitURL;/packages/6.3/python-2.7.13-x86_64-1.txz</URL>
<MD5>67d18569672de5dd48e4dda2f7ce0e88</MD5>
</FILE>
2016-10-28 11:55:43 +00:00
<FILE Name="&plgPATH;/python-2.7.9-x86_64-1.txz" Max="6.1.99" Run="/sbin/upgradepkg --install-new">
2016-11-04 18:45:37 +00:00
<URL>&gitURL;/packages/6.1/python-2.7.9-x86_64-1.txz</URL>
2016-10-10 00:02:11 +00:00
<MD5>7d5f6d12757c59e5f08ca25bd63aab78</MD5>
2016-03-12 09:07:14 +00:00
</FILE>
2016-10-15 17:15:57 +00:00
<FILE Name="&plgPATH;/pyOpenSSL-0.15.1-x86_64-1_slack.txz" Min="6.1" Run="/sbin/upgradepkg --install-new">
2015-12-11 21:09:42 +00:00
<URL>&pkgURL;/pyOpenSSL-0.15.1-x86_64-1_slack.txz</URL>
2015-12-11 03:54:56 +00:00
<MD5>b422874df919df6baa10774bd2ddc2cc</MD5>
</FILE>
2016-10-10 00:16:00 +00:00
<FILE Name="&plgPATH;/&name;.cfg">
2016-01-03 00:18:09 +00:00
<INLINE>
<![CDATA[
2017-01-24 05:01:21 +00:00
VERSION="1.0.2"
2016-06-03 19:16:06 +00:00
TIMEOUT="10"
2016-01-03 00:18:09 +00:00
SECURE="no"
UNITS="bits"
SHARE="share"
LIST="auto"
SERVER=""
hour="3"
mode="2"
min="0"
]]>
</INLINE>
</FILE>
2015-12-11 21:02:50 +00:00
<!--
The 'plugin' package file.
-->
2016-10-10 00:16:00 +00:00
<FILE Name="&plgPATH;/&plgNAME;.txz">
<URL>&gitURL;/archive/&plgNAME;.txz</URL>
2015-12-11 21:02:50 +00:00
</FILE>
<!--
The 'plugin' package MD5 hash.
-->
2016-10-10 00:16:00 +00:00
<FILE Name="&plgPATH;/&plgNAME;.md5">
<URL>&gitURL;/archive/&plgNAME;.md5</URL>
2015-12-11 03:54:56 +00:00
</FILE>
<!--
The 'install' script.
-->
<FILE Run="/bin/bash">
2015-12-20 08:58:44 +00:00
<INLINE>
#Verify unRAID Version
source /etc/unraid-version
2016-03-14 06:35:32 +00:00
VER=${version:0:3}
if [[ $VER == 6.0 ]]; then
2015-12-20 08:58:44 +00:00
echo "unRAID version 6.1 or higher is required"
exit 1
fi
2015-12-11 03:54:56 +00:00
# Verify and install plugin package
2016-10-10 00:16:00 +00:00
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
2015-12-11 03:54:56 +00:00
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash."
2016-10-10 00:16:00 +00:00
rm &plgPATH;/&plgNAME;.txz
rm &plgPATH;/&plgNAME;.md5
2015-12-11 03:54:56 +00:00
exit 1
else
2016-10-09 23:41:46 +00:00
2016-10-10 00:16:00 +00:00
upgradepkg --install-new &plgPATH;/&plgNAME;.txz
2016-03-25 04:53:55 +00:00
2015-12-11 03:54:56 +00:00
# Cleaning old source files
2016-10-10 00:16:00 +00:00
find &plgPATH;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgPATH;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
2015-12-11 03:54:56 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been installed."
echo " This plugin requires Dynamix webGui to operate"
2017-02-12 18:17:17 +00:00
echo " Copyright 2015-2017, &author;"
2015-12-11 03:54:56 +00:00
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
2016-03-25 04:53:55 +00:00
fi
2015-12-11 03:54:56 +00:00
</INLINE>
</FILE>
<!--
The 'remove' script.
-->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
2016-10-10 00:16:00 +00:00
removepkg &plgPATH;/&plgNAME;.txz
2015-12-11 04:41:43 +00:00
rm -rf &emhttp;
2016-10-15 17:15:57 +00:00
rm -f &plgPATH;/*.txz \
&plgPATH;/*.md5
2015-12-11 03:54:56 +00:00
2015-12-21 00:45:00 +00:00
# Remove cron entry
rm -f /boot/config/plugins/dynamix/speedtest.cron
/usr/local/sbin/update_cron
2015-12-11 03:54:56 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been removed."
2017-02-12 18:17:17 +00:00
echo " Copyright 2015-2017, &author;"
2015-12-11 03:54:56 +00:00
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>
2016-09-16 16:34:03 +00:00
</PLUGIN>