wok-current annotate shell-detector/receipt @ rev 20720
updated aqualung (0.9beta10 -> 1.02)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Feb 08 15:11:05 2019 +0100 (2019-02-08) |
parents | 9e01bc6321ea |
children | 34e801e0eb52 |
rev | line source |
---|---|
pascal@13243 | 1 # SliTaz package receipt. |
pascal@13243 | 2 |
pascal@13243 | 3 PACKAGE="shell-detector" |
pascal@16041 | 4 VERSION="20140308" |
pascal@13243 | 5 CATEGORY="network" |
pascal@13243 | 6 SHORT_DESC="Web shell detection tool." |
pascal@13243 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15593 | 8 LICENSE="MIT" |
pascal@20672 | 9 WEB_SITE="https://www.emposha.com/security/php-shell-detector-web-shell-detection-tool.html" |
pascal@13243 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@13243 | 11 #WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master" |
pascal@13243 | 12 WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git" |
pascal@13243 | 13 |
pascal@13243 | 14 DEPENDS="php" |
pascal@13243 | 15 BUILD_DEPENDS="git" |
pascal@13243 | 16 |
pascal@13243 | 17 # Rules to configure and make the package. |
pascal@13243 | 18 compile_rules() |
pascal@13243 | 19 { |
pascal@13243 | 20 cd $src |
pascal@13243 | 21 } |
pascal@13243 | 22 |
pascal@13243 | 23 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13243 | 24 genpkg_rules() |
pascal@13243 | 25 { |
pascal@13243 | 26 mkdir -p $fs/usr/share/$PACKAGE |
pascal@13243 | 27 cp -a $src/* $fs/usr/share/$PACKAGE |
pascal@13243 | 28 ln -s shelldetect.php $fs/usr/share/$PACKAGE/index.php |
pascal@13243 | 29 chown -R www.www $fs/usr/share/$PACKAGE |
pascal@13243 | 30 } |
pascal@13243 | 31 |
pascal@13243 | 32 post_install() |
pascal@13243 | 33 { |
pascal@13243 | 34 # Configure lighttpd server |
pascal@18730 | 35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 36 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@18730 | 37 sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",| \"/examples/\" => \"/usr/share/examples/\",\\n \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i "$1/etc/lighttpd/lighttpd.conf" |
pascal@13243 | 38 if [ -z "$1" ]; then |
pascal@13243 | 39 # Start Web server. |
pascal@13243 | 40 /etc/init.d/lighttpd stop |
pascal@13243 | 41 /etc/init.d/lighttpd start |
pascal@13243 | 42 fi |
pascal@13243 | 43 fi |
pascal@13243 | 44 fi |
pascal@13243 | 45 # Configure apache server |
pascal@18730 | 46 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 47 if [ ! -f "$1/etc/apache/conf.d/$PACKAGE" ]; then |
pascal@18730 | 48 cat > "$1/etc/apache/conf.d/$PACKAGE" <<EOT |
pascal@13243 | 49 <IfModule mod_alias.c> |
pascal@13243 | 50 Alias /$PACKAGE /usr/share/$PACKAGE |
pascal@13243 | 51 </IfModule> |
pascal@13243 | 52 <DirectoryMatch /usr/share/$PACKAGE/> |
pascal@13243 | 53 DirectoryIndex index.php |
pascal@13243 | 54 Options +FollowSymLinks |
pascal@13243 | 55 AllowOverride None |
pascal@13243 | 56 Order allow,deny |
pascal@13243 | 57 Allow from all |
pascal@13243 | 58 </DirectoryMatch> |
pascal@13243 | 59 EOT |
pascal@13243 | 60 if [ -z "$1" ]; then |
pascal@13243 | 61 # Start Web server. |
pascal@13243 | 62 /etc/init.d/apache stop |
pascal@13243 | 63 /etc/init.d/apache start |
pascal@13243 | 64 fi |
pascal@13243 | 65 fi |
pascal@13243 | 66 fi |
pascal@13243 | 67 } |