# SliTaz package receipt. PACKAGE="nzbget-webui" VERSION="21.1" CATEGORY="network" SHORT_DESC="The most efficient usenet downloader, web user interface." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" WEB_SITE="https://nzbget.net/" DEPENDS="nzbget" WANTED="nzbget" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/share/nzbget cp -a $install/usr/share/nzbget/webui $fs/usr/share/nbzget } post_install() { # Configure lighttpd server if [ -f "$1/etc/lighttpd/lighttpd.conf" ] then if ! grep -q /usr/share/nzbget/ "$1/etc/lighttpd/lighttpd.conf" then sed -i -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/nzbget/" => "/usr/share/nzbget/webui/",|g' \ "$1/etc/lighttpd/lighttpd.conf" if [ -z "$1" ] then # Start Web server. /etc/init.d/lighttpd stop /etc/init.d/lighttpd start fi fi fi # Configure apache server if [ -f "$1/etc/apache/httpd.conf" ] then if [ ! -f "$1/etc/apache/conf.d/nzbget" ] then cat > "$1/etc/apache/conf.d/nzbget" < Alias /nzbget /usr/share/nzbget/webui DirectoryIndex index.html Options +FollowSymLinks AllowOverride None Order allow,deny Allow from all EOT if [ -z "$1" ] then # Start Web server. /etc/init.d/apache stop /etc/init.d/apache start fi fi fi }