Unraid-SlackPack/plugins/apache.plg

272 lines
8.0 KiB
Plaintext
Raw Normal View History

2016-09-16 20:39:44 +00:00
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "apache">
<!ENTITY author "dmacias72">
2016-10-15 16:34:42 +00:00
<!ENTITY version "2016.10.15">
2016-09-16 20:39:44 +00:00
<!ENTITY launch "Settings/&name;">
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
<!ENTITY pkgURL "&gitURL;/source/packages">
2016-10-15 16:34:42 +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;">
]>
<PLUGIN name="&name;" author="&author;" launch="&launch;" version="&version;" pluginURL="&pluginURL;">
<!--
This Plugin installs and controls The Apache HTTP Server ("httpd") for unRaid 6.0 ONLY. All dependencies are installed as needed and is controlable from the webgui.
-->
<CHANGES>
2016-10-15 16:34:42 +00:00
###2016.10.15
- add: min and max version to plg
- update php extensions to 5.6.26 match unRAID 6.3
2016-09-24 23:58:20 +00:00
###2016.09.24
- fix: apr and apr-util packages not installing
- fix: clearing log files
- add: restart button
- add: missing dependencies for gd.so
2016-09-18 00:21:36 +00:00
###2016.09.17a
- fix: php.ini not being used
- update php extensions to 5.6.24 match unRAID 6.2
2016-09-17 07:21:21 +00:00
###2016.09.17
2016-09-16 20:39:44 +00:00
- update plugin for 6.2 only
###2015.09.07
- fix start and stop scripts
###2015.09.06
- change image png
- refomat code for markdown and dynamix inherent functions
###2015.08.31
- add full path to settings page POST script
###2015.08.27
- fix plugin remove script
###2015.08.26
- update extensions to php 5.4.44
- updated for unRAID 6.1
###2015.08.20
- fix rc.apache symlink
###2015.08.19
- update apache to 2.4.16
- update extentions to php 5.4.43
- updates for unRAID 6.1-rc* only
###2015.06.06
- update to apache 2.4.12
- update php extensions to 5.4.40
- remove libpng and libjpeg packages will need to reboot
###2015.05.22
- condense code
- use native v6 code and styling
###2015.04.18
- fix bugs
- add version and link to webserver
###2015.04.17
- update extentions to php 5.4.36
- added directory browser
- reformatted layout
###2015.01.31
- update for beta12+
###2014.09.25
- fix install and remove scripts
###2014.09.25
- reformated github and plugin format
- conf files will now be in /boot/config/plugins/apache/httpd
###2014.06.07
- initial commit
</CHANGES>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/apr-1.5.2-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-16 20:39:44 +00:00
<URL>&gitURL;/packages/6.2/apr-1.5.2-x86_64-1.txz</URL>
<MD5>4076e8b7bd35e028b1cfb9224b51afc8</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/apr-util-1.5.4-x86_64-2.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-16 20:39:44 +00:00
<URL>&gitURL;/packages/6.2/apr-util-1.5.4-x86_64-2.txz</URL>
<MD5>4efea0ce9975635fe82ad0a6a079d1ca</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/freetype-2.6.5-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/freetype-2.6.5-x86_64-1.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>60eb82ef3458130fc48f07e6f5035876</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/harfbuzz-1.3.0-x86_64-1.txz" Max="6.2" Run="upgradepkg --install-new">
2016-09-24 23:58:20 +00:00
<URL>&pkgURL;/harfbuzz-1.3.0-x86_64-1.txz</URL>
<MD5>348c80202ce746b41557708bddf9c35b</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/httpd-2.4.23-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/httpd-2.4.23-x86_64-1.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>5a7a6f7ec34f23b88bd60072dcc1add9</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libiodbc-3.52.10-x86_64-2.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 07:05:52 +00:00
<URL>&pkgURL;/libiodbc-3.52.10-x86_64-2.txz</URL>
<MD5>5d62962db9add60780e184c76048d3d3</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libmcrypt-2.5.8-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 04:49:54 +00:00
<URL>&pkgURL;/libmcrypt-2.5.8-x86_64-1.txz</URL>
<MD5>758bfc84d60a0d1bb8c1e51caaffe50f</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libtool-2.4.6-x86_64-4.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/libtool-2.4.6-x86_64-4.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>3a4d8446f6025bdc06f423d719f942e8</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libvpx-1.5.0-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-24 23:58:20 +00:00
<URL>&pkgURL;/libvpx-1.5.0-x86_64-1.txz</URL>
<MD5>04ee011ea0510d961d121883930c2fda</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libX11-1.6.3-x86_64-2.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/libX11-1.6.3-x86_64-2.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>26472fb7e9d86d3127a427f2c364623f</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libXau-1.0.8-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/libXau-1.0.8-x86_64-1.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>b09a959ee01a1ea1d31600999b05dfef</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libxcb-1.11.1-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/libxcb-1.11.1-x86_64-1.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>86a2a1c5f8fa01e6c2372d3d957201c4</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libXdmcp-1.1.2-x86_64-2.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/libXdmcp-1.1.2-x86_64-2.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>ce01ef3cc35262bb124d36e2f5c520c5</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/libXpm-3.5.11-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/libXpm-3.5.11-x86_64-1.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>d7e67e2109a8b0e3e554187dcccf3089</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/net-snmp-5.7.3-x86_64-3.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/net-snmp-5.7.3-x86_64-3.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>4e5e3b7b73388912e18205ab1f509629</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/php-ext-5.6.24-x86_64-1.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-18 00:21:36 +00:00
<URL>&pkgURL;/php-ext-5.6.24-x86_64-1.txz</URL>
<MD5>b83aefdaa0904deec56e00fc6dc5def5</MD5>
2016-09-16 20:39:44 +00:00
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/php-ext-5.6.26-x86_64-1.txz" Min="6.3" Run="upgradepkg --install-new">
<URL>&pkgURL;/php-ext-5.6.26-x86_64-1.txz</URL>
<MD5>6caeec1b7f8bf4c29baa27b63dd46891</MD5>
</FILE>
<FILE Name="&plgPATH;/t1lib-5.1.2-x86_64-3.txz" Min="6.2" Run="upgradepkg --install-new">
2016-09-17 00:40:05 +00:00
<URL>&pkgURL;/t1lib-5.1.2-x86_64-3.txz</URL>
2016-09-16 20:39:44 +00:00
<MD5>6942fb6f9f78b8e3cc4a1c77469a2512</MD5>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/&name;.cfg">
2016-09-16 21:35:01 +00:00
<INLINE>
<![CDATA[
# Apache Web Server configuration:
SERVICE="disable"
DOCROOT="/var/www/html"
PORT="8088"
RUNAS="nobody"
]]>
</INLINE>
</FILE>
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/&name;-cert.sh">
2016-09-16 21:35:01 +00:00
<INLINE>
<![CDATA[
openssl req -new -x509 -keyout /boot/config/plugins/apache/server.crt -out /boot/config/plugins/apache/server.crt -days 365 -nodes; chmod 600 /boot/config/plugins/apache/server.crt
]]>
</INLINE>
</FILE>
2016-09-16 20:39:44 +00:00
<!--
2016-09-16 21:35:01 +00:00
The 'plugin' package file.
2016-09-16 20:39:44 +00:00
-->
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/&plgNAME;.txz">
<URL>&gitURL;/archive/&plgNAME;.txz</URL>
2016-09-16 21:35:01 +00:00
</FILE>
<!--
The 'plugin' package MD5 hash.
-->
2016-10-15 16:34:42 +00:00
<FILE Name="&plgPATH;/&plgNAME;.md5">
<URL>&gitURL;/archive/&plgNAME;.md5</URL>
2016-09-16 20:39:44 +00:00
</FILE>
<!--
The 'install' script.
-->
<FILE Run="/bin/bash">
<INLINE>
2016-09-16 21:35:01 +00:00
#Verify unRAID Version
source /etc/unraid-version
VER=${version:0:3}
if [[ $VER == 6.1 ]]; then
echo "unRAID version 6.2 or higher is required"
exit 1
2016-09-16 20:39:44 +00:00
fi
2016-09-16 21:35:01 +00:00
# Verify and install plugin package
2016-10-15 16:34:42 +00:00
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
2016-09-16 21:35:01 +00:00
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash."
2016-10-15 16:34:42 +00:00
rm &plgPATH;/&plgNAME;.txz
rm &plgPATH;/&plgNAME;.md5
2016-09-16 21:35:01 +00:00
exit 1
else
2016-10-15 16:34:42 +00:00
upgradepkg --install-new &plgPATH;/&plgNAME;.txz
2016-09-16 21:35:01 +00:00
# Cleaning old source files
2016-10-15 16:34:42 +00:00
find &plgPATH;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgPATH;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
2016-09-16 21:35:01 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been installed."
echo " This plugin requires Dynamix webGui to operate"
echo " Copyright 2016, &author;"
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
2016-09-16 20:39:44 +00:00
fi
</INLINE>
</FILE>
<!--
The 'remove' script.
-->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
2016-09-17 07:48:55 +00:00
/etc/rc.d/rc.apache stop
2016-10-15 16:34:42 +00:00
removepkg &plgPATH;/&plgNAME;.txz
2016-09-16 21:35:01 +00:00
rm -rf &emhttp;
2016-10-15 16:34:42 +00:00
rm -f &plgPATH;/&plgNAME;.txz
rm -f &plgPATH;/&plgNAME;.md5
2016-09-16 21:35:01 +00:00
#remove installed packages
2016-09-17 07:48:55 +00:00
echo "Please wait, removing installed packages..."
2016-09-17 07:21:21 +00:00
<![CDATA[
2016-09-17 07:48:55 +00:00
removepkg /boot/config/plugins/apache/*.txz > /dev/null 2>&1
rm -f /boot/config/plugins/apache/*.txz
2016-09-17 07:21:21 +00:00
]]>
2016-09-16 21:35:01 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been removed."
echo " Copyright 2016, &author;"
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
2016-09-16 20:39:44 +00:00
</INLINE>
</FILE>
2016-09-17 00:32:19 +00:00
</PLUGIN>