Unraid-SlackPack/plugins/wakeonlan.plg

156 lines
4.1 KiB
Plaintext
Raw Normal View History

2016-01-07 07:02:03 +00:00
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "wakeonlan">
<!ENTITY author "dmacias72">
2017-01-29 20:22:16 +00:00
<!ENTITY version "2017.01.29">
2016-01-09 08:47:28 +00:00
<!ENTITY launch "Settings/Wakeonlan">
2016-01-07 07:02:03 +00:00
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
2016-09-16 20:39:44 +00:00
<!ENTITY pkgURL "&gitURL;/source/packages">
2016-10-22 07:52:48 +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;">
2016-01-07 07:02:03 +00:00
]>
<PLUGIN name="&name;" author="&author;" launch="&launch;" version="&version;" pluginURL="&pluginURL;">
<CHANGES>
2016-10-23 02:00:39 +00:00
##&name;
###&version;
2017-01-29 20:22:16 +00:00
- harden code for XSS and CSRF vulnerabilities
- update nmap to 7.40
- fix blank scan.xml causing errors
- misc code improvements
2016.10.24
2016-10-24 18:13:44 +00:00
- fix: ip address variable
- fix: scan not working
###2016.10.22
2016-10-22 07:52:48 +00:00
- update ip address variable
- update code formatting
2016-09-16 16:34:03 +00:00
###2016.09.16
- update tablesorter to 2.27.6
2016-01-16 22:53:31 +00:00
###2016.01.16
- minor diplay changes
- add tablesorter as a separate package
2016-01-09 10:23:39 +00:00
###2016.01.09a
- saved mac address cannot be blank
- minor code changes
###2016.01.09
- move repo to unRaid-plugins
- add tablesorter fork for better sorting and sort save
- add separate tab for scanning
- completely update layout and revise code
2016-01-07 07:02:03 +00:00
###2015.11.21
- minor fixes
###2015.03.05a
- fix default ethernet interface
###2015.02.24
2016-09-16 20:39:44 +00:00
- button bindings when editing
2016-01-07 07:02:03 +00:00
###2015.02.21
- added autosave
- added table sorting
- disable scan function caching
- loading gifs
- show scan results only after scan
- scan ip after wake
###2015.02.20
- initial unRAID 6 release.
</CHANGES>
<!--
This plugin uses etherwake for wake on lan
-->
2016-10-22 07:52:48 +00:00
<FILE Name="&plgPATH;/etherwake-1.09-x86_64-5cf.txz" Min="6.1" Run="upgradepkg --install-new">
2016-01-07 07:02:03 +00:00
<URL>&pkgURL;/etherwake-1.09-x86_64-5cf.txz</URL>
<MD5>0b65b7b7ac2262f1a9b998cbb9f913e2</MD5>
</FILE>
2016-10-22 07:52:48 +00:00
<FILE Name="&plgPATH;/libnl-1.1.4-x86_64-1.txz" Min="6.1" Run="upgradepkg --install-new">
2016-01-07 07:02:03 +00:00
<URL>&pkgURL;/libnl-1.1.4-x86_64-1.txz</URL>
<MD5>435837a5bf0401a937d6ec93e458333b</MD5>
</FILE>
2017-01-29 20:22:16 +00:00
<FILE Name="&plgPATH;/nmap-7.40-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-10-22 07:52:48 +00:00
<URL>&pkgURL;/nmap-7.12-x86_64-1.txz</URL>
2017-01-29 20:22:16 +00:00
<MD5>d48d79e1e57aaeb7aee322c78ad9b9a6</MD5>
2016-10-22 07:52:48 +00:00
</FILE>
2016-10-28 11:55:43 +00:00
<FILE Name="&plgPATH;/nmap-6.40-x86_64-1.txz" Min="6.1" Max="6.1.99" Run="upgradepkg --install-new">
2016-10-22 07:52:48 +00:00
<URL>&pkgURL;/nmap-6.40-x86_64-1.txz</URL>
<MD5>462cf835c4475ddfd2bd15cd10e8349d</MD5>
</FILE>
2016-01-07 07:02:03 +00:00
<!--
The 'plugin' package file.
-->
2016-10-22 07:52:48 +00:00
<FILE Name="&plgPATH;/&plgNAME;.txz">
<URL>&gitURL;/archive/&plgNAME;.txz</URL>
2016-01-07 07:02:03 +00:00
</FILE>
<!--
The 'plugin' package MD5 hash.
-->
2016-10-22 07:52:48 +00:00
<FILE Name="&plgPATH;/&plgNAME;.md5">
<URL>&gitURL;/archive/&plgNAME;.md5</URL>
2016-01-07 07:02:03 +00:00
</FILE>
<!--
The 'install' script.
-->
<FILE Run="/bin/bash">
2016-09-16 20:39:44 +00:00
<INLINE>
2016-01-07 07:02:03 +00:00
#Verify unRAID Version
source /etc/unraid-version
if [[ ${version:0:3} == 6.0 ]]; then
echo "unRAID version 6.1 or higher is required"
exit 1
fi
# Verify and install plugin package
2016-10-22 07:52:48 +00:00
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
2016-01-07 07:02:03 +00:00
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash."
2016-10-22 07:52:48 +00:00
rm &plgPATH;/&plgNAME;.txz
rm &plgPATH;/&plgNAME;.md5
2016-01-07 07:02:03 +00:00
exit 1
else
2016-10-22 07:52:48 +00:00
upgradepkg --install-new &plgPATH;/&plgNAME;.txz
2016-01-07 07:02:03 +00:00
fi
# Cleaning old source files
2016-10-22 07:52:48 +00:00
find &plgPATH;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgPATH;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
2016-01-07 07:02:03 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been installed."
echo " This plugin requires Dynamix webGui to operate"
2017-01-29 20:22:16 +00:00
echo " Copyright 2016-2017, &author;"
2016-01-07 07:02:03 +00:00
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>
The 'remove' script.
-->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
2016-10-22 07:52:48 +00:00
removepkg &plgPATH;/&plgNAME;.txz
2016-01-07 07:02:03 +00:00
rm -rf &emhttp;
2016-10-22 07:52:48 +00:00
rm -f &plgPATH;/*.txz \
&plgPATH;/*.md5
2016-01-07 07:02:03 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been removed."
2017-01-29 20:22:16 +00:00
echo " Copyright 2016-2017, &author;"
2016-01-07 07:02:03 +00:00
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>
2016-09-16 16:34:03 +00:00
</PLUGIN>