# HG changeset patch # User Pascal Bellard # Date 1344944364 -7200 # Node ID 93c2e18df0af16ca90f83bc75fa016a3cd4e99f0 # Parent 883aaa8d90bc704670dce1c8fb929503b8133d02 Move from undigest: shell-detector diff -r 883aaa8d90bc -r 93c2e18df0af shell-detector/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shell-detector/receipt Tue Aug 14 13:39:24 2012 +0200 @@ -0,0 +1,66 @@ +# SliTaz package receipt. + +PACKAGE="shell-detector" +VERSION="current" +CATEGORY="network" +SHORT_DESC="Web shell detection tool." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.emposha.com/security/php-shell-detector-web-shell-detection-tool.html" +TARBALL="$PACKAGE-$VERSION.tar.bz2" +#WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master" +WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git" + +DEPENDS="php" +BUILD_DEPENDS="git" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share/$PACKAGE + cp -a $src/* $fs/usr/share/$PACKAGE + ln -s shelldetect.php $fs/usr/share/$PACKAGE/index.php + chown -R www.www $fs/usr/share/$PACKAGE +} + +post_install() +{ + # Configure lighttpd server + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then + if ! grep -q /usr/share/phpsysinfo/ $1/etc/lighttpd/lighttpd.conf; then + sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",| \"/examples/\" => \"/usr/share/examples/\",\\n \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i $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/$PACKAGE ]; then + cat > $1/etc/apache/conf.d/$PACKAGE < + Alias /$PACKAGE /usr/share/$PACKAGE + + + DirectoryIndex index.php + 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 +}