diff --git a/plugins/ungit.plg b/plugins/ungit.plg new file mode 100644 index 00000000..d2d3d341 --- /dev/null +++ b/plugins/ungit.plg @@ -0,0 +1,133 @@ + + + + + + + + + + + + +]> + + + + + + +##&name; +###&version; +- initial commit + + + +&gitURL;/packages/6.2/nodejs-4.6.0-x86_64-1_slonly.txz +8a7dae6947e415f2dd01bf4d2a57b6f4 + + + +&gitURL;/packages/6.1/nodejs-4.2.4-x86_64-1_slack.txz +7c17ad5a7aab095c9dbfe54051772ded + + + + + + + + + + +&gitURL;/archive/&plgNAME;.txz + + + + +&gitURL;/archive/&plgNAME;.md5 + + + + + +#Verify unRAID Version +source /etc/unraid-version +VER=${version:0:3} + +if [[ $VER == 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 + + #restart event daemon + /dev/null 2>&1 < /dev/null & + sleep 1 + echo "starting libvirtwol..." + setsid /usr/local/emhttp/plugins/ungit/scripts/start >/dev/null 2>&1 < /dev/null & + ]]> + + # 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" +echo " Copyright 2016, &author;" +echo " Version: &version;" +echo "-----------------------------------------------------------" +echo "" + +fi + + + + + + +&emhttp;/scripts/stop +removepkg &plgPATH;/&plgNAME;.txz +rm -rf &emhttp; +rm -f &plgPATH;/*.txz \ + &plgPATH;/*.md5 + +echo "" +echo "-----------------------------------------------------------" +echo " &name; has been removed." +echo " Copyright 2016, &author;" +echo " Version: &version;" +echo "-----------------------------------------------------------" +echo "" + + + + \ No newline at end of file