2016-02-06 06:11:28 +00:00
|
|
|
<?xml version='1.0' standalone='yes'?>
|
|
|
|
|
|
|
|
<!DOCTYPE PLUGIN [
|
|
|
|
<!ENTITY name "aesir-plugin">
|
2016-02-06 06:26:40 +00:00
|
|
|
<!ENTITY author "dmacias72, Kode">
|
2016-02-12 21:05:44 +00:00
|
|
|
<!ENTITY version "2016.02.12a">
|
2016-02-06 06:11:28 +00:00
|
|
|
<!ENTITY launch "Settings/Aesir">
|
2016-02-06 06:26:40 +00:00
|
|
|
<!ENTITY gitURL "https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master">
|
2016-02-06 17:09:24 +00:00
|
|
|
<!ENTITY gitTAR "aesir-master.tar.gz">
|
2016-02-06 06:11:28 +00:00
|
|
|
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
|
|
|
|
<!ENTITY pkgURL "&gitURL;/source/packages">
|
2016-02-06 17:09:24 +00:00
|
|
|
<!ENTITY plgPATH "/boot/config/plugins/&name;">
|
|
|
|
<!ENTITY plgNAME "&name;-&version;-x86_64-1">
|
2016-02-06 06:11:28 +00:00
|
|
|
<!ENTITY http "/srv/www/Aesir">
|
|
|
|
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
|
|
|
|
]>
|
|
|
|
|
|
|
|
<PLUGIN name="&name;" author="&author;" launch="&launch;" version="&version;" pluginURL="&pluginURL;">
|
|
|
|
|
|
|
|
<!--
|
|
|
|
This Plugin installs and controls Aesir webGUI for unRaid 6.1+ All dependencies are installed as needed and is controlable from the webgui.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<CHANGES>
|
2016-02-12 21:05:44 +00:00
|
|
|
###2016.02.12a
|
|
|
|
- move start and stop to rc.script
|
|
|
|
- remove 1 min time limit on updates
|
|
|
|
- move file permissions from plg to package doinst.sh
|
2016-02-06 15:19:46 +00:00
|
|
|
###2016.02.06
|
2016-02-06 17:09:24 +00:00
|
|
|
- fix events not executable
|
2016-02-06 15:19:46 +00:00
|
|
|
- fix dockers not visible when running other than root
|
|
|
|
- remove user selection
|
2016-02-06 06:11:28 +00:00
|
|
|
###2016.02.05
|
|
|
|
- initial commit
|
|
|
|
</CHANGES>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
git from github as tarball
|
|
|
|
-->
|
2016-02-06 17:15:56 +00:00
|
|
|
<FILE Name="&plgPATH;/&gitTAR;">
|
2016-02-06 06:11:28 +00:00
|
|
|
<URL>"https://api.github.com/repos/linuxserver/Aesir/tarball/master"</URL>
|
|
|
|
</FILE>
|
|
|
|
|
2016-02-06 17:09:24 +00:00
|
|
|
<FILE Name="&plgPATH;/&name;.cfg">
|
2016-02-06 06:11:28 +00:00
|
|
|
<INLINE>
|
|
|
|
<![CDATA[
|
|
|
|
SERVICE="disable"
|
|
|
|
DOCROOT="/mnt/cache/appdata/Aesir"
|
|
|
|
PORT="8088"
|
2016-02-06 17:09:24 +00:00
|
|
|
RUNAS="root"
|
2016-02-06 06:11:28 +00:00
|
|
|
]]>
|
|
|
|
</INLINE>
|
|
|
|
</FILE>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
The 'plugin' package file.
|
|
|
|
-->
|
2016-02-06 17:09:24 +00:00
|
|
|
<FILE Name="&plgPATH;/&plgNAME;.txz">
|
|
|
|
<URL>&gitURL;/archive/&plgNAME;.txz</URL>
|
2016-02-06 06:11:28 +00:00
|
|
|
</FILE>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
The 'plugin' package MD5 hash.
|
|
|
|
-->
|
2016-02-06 17:09:24 +00:00
|
|
|
<FILE Name="&plgPATH;/&plgNAME;.md5">
|
|
|
|
<URL>&gitURL;/archive/&plgNAME;.md5</URL>
|
2016-02-06 06:11:28 +00:00
|
|
|
</FILE>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
The 'install' script.
|
|
|
|
-->
|
|
|
|
<FILE Run="/bin/bash">
|
|
|
|
<INLINE>
|
|
|
|
#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-02-06 17:09:24 +00:00
|
|
|
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
|
|
|
|
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
|
2016-02-06 06:11:28 +00:00
|
|
|
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
|
|
|
|
echo "Wrong 'plugin' package md5 hash."
|
2016-02-06 17:09:24 +00:00
|
|
|
rm &plgPATH;/&plgNAME;.txz
|
|
|
|
rm &plgPATH;/&plgNAME;.md5
|
2016-02-06 06:11:28 +00:00
|
|
|
exit 1
|
|
|
|
else
|
2016-02-06 17:09:24 +00:00
|
|
|
upgradepkg --install-new &plgPATH;/&plgNAME;.txz
|
2016-02-06 06:11:28 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Cleaning old source files
|
2016-02-06 17:09:24 +00:00
|
|
|
find &plgPATH;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
|
|
|
|
find &plgPATH;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
|
2016-02-06 06:11:28 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "-----------------------------------------------------------"
|
|
|
|
echo " &name; has been installed."
|
|
|
|
echo " This plugin requires Dynamix webGui to operate"
|
2016-02-06 06:26:40 +00:00
|
|
|
echo " Copyright 2016, &author;"
|
2016-02-06 06:11:28 +00:00
|
|
|
echo " Version: &version;"
|
|
|
|
echo "-----------------------------------------------------------"
|
|
|
|
echo ""
|
|
|
|
</INLINE>
|
|
|
|
</FILE>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
The 'remove' script.
|
|
|
|
-->
|
|
|
|
<FILE Run="/bin/bash" Method="remove">
|
|
|
|
<INLINE>
|
2016-02-12 21:05:44 +00:00
|
|
|
/etc/rc.d/rc.aesir stop
|
2016-02-06 17:09:24 +00:00
|
|
|
removepkg &plgPATH;/*.txz
|
2016-02-06 06:11:28 +00:00
|
|
|
rm -rf &emhttp;
|
2016-02-06 17:09:24 +00:00
|
|
|
rm -f &plgPATH;/*.txz
|
|
|
|
rm -f &plgPATH;/*.md5
|
2016-02-06 17:13:17 +00:00
|
|
|
rm -f &plgPATH;/&gitTAR;
|
2016-02-06 06:11:28 +00:00
|
|
|
echo ""
|
|
|
|
echo "-----------------------------------------------------------"
|
|
|
|
echo " &name; has been removed."
|
2016-02-06 06:26:40 +00:00
|
|
|
echo " Copyright 2016, &author;"
|
2016-02-06 06:11:28 +00:00
|
|
|
echo " Version: &version;"
|
|
|
|
echo "-----------------------------------------------------------"
|
|
|
|
echo ""
|
|
|
|
</INLINE>
|
|
|
|
</FILE>
|
|
|
|
|
|
|
|
<FILE Name="/tmp/aesir-plugin-chkconf" Run="/bin/bash">
|
|
|
|
<INLINE>
|
|
|
|
<![CDATA[
|
|
|
|
#!/bin/sh
|
|
|
|
# This will check each entry in the config so nothing is missing, and if missing, sets to default
|
|
|
|
CFGFILE=/boot/config/plugins/aesir-plugin/aesir-plugin.cfg
|
|
|
|
[ ! `cat "$CFGFILE" | grep SERVICE` ] && echo "SERVICE=\"disable\"" >> "$CFGFILE"
|
|
|
|
[ ! `cat "$CFGFILE" | grep DOCROOT` ] && echo "DOCROOT=\"/mnt/cache/appdata/Aesir\"" >> "$CFGFILE"
|
|
|
|
[ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"8088\"" >> "$CFGFILE"
|
2016-02-06 17:09:24 +00:00
|
|
|
[ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"root\"" >> "$CFGFILE"
|
2016-02-06 06:11:28 +00:00
|
|
|
rm /tmp/aesir-plugin-chkconf
|
|
|
|
]]>
|
|
|
|
</INLINE>
|
|
|
|
</FILE>
|
|
|
|
|
|
|
|
</PLUGIN>
|