Unraid-SlackPack/plugins/wakeonlan.plg

162 lines
4.2 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">
2016-09-16 16:34:03 +00:00
<!ENTITY version "2016.09.16">
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-01-07 07:02:03 +00:00
<!ENTITY plgpath "/boot/config/plugins/&name;">
2016-09-16 20:39:44 +00:00
<!ENTITY plgname "&name;-&version;-x86_64-1">
<!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-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>
2016-01-16 22:53:31 +00:00
<!--
The 'tablesorter' package file.
-->
2016-09-16 16:34:03 +00:00
<FILE Name="/boot/config/plugins/tablesorter/tablesorter-2.27.6-x86_64-1.txz" Run="/sbin/upgradepkg --install-new">
<URL>&gitURL;/archive/tablesorter-2.27.6-x86_64-1.txz</URL>
<MD5>ead9fb4c4a317e7d6426b3521f0e0c0b</MD5>
2016-01-16 22:53:31 +00:00
</FILE>
2016-01-07 07:02:03 +00:00
<!--
This plugin uses etherwake for wake on lan
-->
<FILE Name="&plgpath;/etherwake-1.09-x86_64-5cf.txz" Run="upgradepkg --install-new">
<URL>&pkgURL;/etherwake-1.09-x86_64-5cf.txz</URL>
<MD5>0b65b7b7ac2262f1a9b998cbb9f913e2</MD5>
</FILE>
<FILE Name="&plgpath;/nmap-6.40-x86_64-1.txz" Run="upgradepkg --install-new">
<URL>&pkgURL;/nmap-6.40-x86_64-1.txz</URL>
<MD5>462cf835c4475ddfd2bd15cd10e8349d</MD5>
</FILE>
<FILE Name="&plgpath;/libnl-1.1.4-x86_64-1.txz" Run="upgradepkg --install-new">
<URL>&pkgURL;/libnl-1.1.4-x86_64-1.txz</URL>
<MD5>435837a5bf0401a937d6ec93e458333b</MD5>
</FILE>
<!--
The 'plugin' package file.
-->
<FILE Name="&plgpath;/&plgname;.txz">
<URL>&gitURL;/archive/&plgname;.txz</URL>
</FILE>
<!--
The 'plugin' package MD5 hash.
-->
<FILE Name="&plgpath;/&plgname;.md5">
<URL>&gitURL;/archive/&plgname;.md5</URL>
</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
sum1=$(/usr/bin/md5sum &plgpath;/&plgname;.txz)
sum2=$(/usr/bin/cat &plgpath;/&plgname;.md5)
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash."
rm &plgpath;/&plgname;.txz
rm &plgpath;/&plgname;.md5
exit 1
else
upgradepkg --install-new &plgpath;/&plgname;.txz
fi
# remove old plugin name folder
2016-01-07 07:02:03 +00:00
if [ -d /usr/local/emhttp/plugins/wol ]; then
2016-09-16 20:39:44 +00:00
rm -f /usr/local/emhttp/plugins/wol
2016-01-07 07:02:03 +00:00
fi
# create log directory
2016-01-07 07:02:03 +00:00
if [ ! -d /var/log/&name; ]; then
2016-09-16 20:39:44 +00:00
mkdir -p /var/log/&name;
2016-01-07 07:02:03 +00:00
fi
chmod 755 /var/log/&name;
2016-01-07 07:02:03 +00:00
# Cleaning old source files
find &plgpath;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgpath;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been installed."
echo " This plugin requires Dynamix webGui to operate"
2016-01-10 10:20:03 +00:00
echo " Copyright 2016, &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>
removepkg &plgpath;/&plgname;.txz
rm -rf &emhttp;
rm -f &plgpath;/&plgname;.txz
rm -f &plgpath;/&plgname;.md5
#remove installed packages
removepkg &plgpath;/*.txz
rm -f &plgpath;/*.txz
2016-01-07 07:02:03 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been removed."
2016-01-10 10:20:03 +00:00
echo " Copyright 2016, &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>