SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "nzbget-webui"

# 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" <<EOT
<IfModule mod_alias.c>
    Alias /nzbget /usr/share/nzbget/webui
</IfModule>
<Directory /usr/share/nzbget/webui/>
    DirectoryIndex index.html
    Options +FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
EOT
            if [ -z "$1" ]
              then
                # Start Web server.
                /etc/init.d/apache stop
                /etc/init.d/apache start
            fi
        fi
    fi
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)