# SliTaz package receipt. PACKAGE="ajaxterm" VERSION="0.10" CATEGORY="network" SHORT_DESC="Login terminal for the web." MAINTAINER="pascal.bellard@slitaz.org" SOURCE="Ajaxterm" TARBALL="$SOURCE-$VERSION.tar.gz" WEB_SITE="http://antony.lesuisse.org/software/ajaxterm/" WGET_URL="${WEB_SITE}files/$TARBALL" DEPENDS="python" SUGGESTED="apache lighttpd-ssl lighttpd-modules" TAGS="web application" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/share/ajaxterm cp -a $src/*.py $src/*.js $src/*.css $src/*.html $fs/usr/share/ajaxterm cp -a $stuff/* $fs/ } post_install() { grep ^RUN_DAEMONS $1/etc/rcS.conf | grep -q "ajaxterm" || sed -i \ 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' $1/etc/rcS.conf # Configure lighttpd server if [ -f $1/usr/lib/lighttpd/mod_proxy.so ]; then grep -q mod_proxy $1/etc/lighttpd/lighttpd.conf || cat >> $1/etc/lighttpd/lighttpd.conf <> $1/etc/lighttpd/lighttpd.conf < ( ( "host" => "127.0.0.1", "port" => 8022 ) ) ) EOT if [ -z "$1" ]; then # Start Web server. /etc/init.d/lighttpd stop /etc/init.d/lighttpd start fi fi # Configure apache server if [ -f $1/etc/apache/httpd.conf ]; then if [ ! -f $1/etc/apache/conf.d/ajaxterm ]; then cat > $1/etc/apache/conf.d/ajaxterm < ProxyRequests Off Order deny,allow Allow from all ProxyPass /ajaxterm/ http://localhost:8022/ ProxyPassReverse /ajaxterm/ http://localhost:8022/ EOT if [ -z "$1" ]; then # Start Web server. /etc/init.d/apache stop sleep 2 /etc/init.d/apache start fi fi fi [ -z "$1" ] && /etc/init.d/ajaxterm start [ ! -f $1/usr/lib/lighttpd/mod_proxy.so -a \ ! -f $1/etc/apache/httpd.conf ] && cat <