wok-next view shell-detector/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | d5aab818505e |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="shell-detector"
4 VERSION="20140308"
5 CATEGORY="network"
6 SHORT_DESC="Web shell detection tool"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 WEB_SITE="https://www.emposha.com/security/php-shell-detector-web-shell-detection-tool.html"
10 HOST_ARCH="any"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 #WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master"
14 WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git"
16 BUILD_DEPENDS="git"
18 compile_rules() {
19 mkdir -p $install/usr/share/$PACKAGE
20 cp -a * $install/usr/share/$PACKAGE
21 ln -s shelldetect.php $install/usr/share/$PACKAGE/index.php
22 chown -R www.www $install/usr/share/$PACKAGE
23 }
25 genpkg_rules() {
26 cp -a $install/usr $fs
27 DEPENDS="php"
28 }
30 post_install() {
31 # Configure lighttpd server
32 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
33 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
34 sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",| \"/examples/\" => \"/usr/share/examples/\",\\n \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i "$1/etc/lighttpd/lighttpd.conf"
35 if [ -z "$1" ]; then
36 # Start Web server.
37 /etc/init.d/lighttpd stop
38 /etc/init.d/lighttpd start
39 fi
40 fi
41 fi
42 # Configure apache server
43 if [ -f "$1/etc/apache/httpd.conf" ]; then
44 if [ ! -f "$1/etc/apache/conf.d/$PACKAGE" ]; then
45 cat > "$1/etc/apache/conf.d/$PACKAGE" <<EOT
46 <IfModule mod_alias.c>
47 Alias /$PACKAGE /usr/share/$PACKAGE
48 </IfModule>
49 <DirectoryMatch /usr/share/$PACKAGE/>
50 DirectoryIndex index.php
51 Options +FollowSymLinks
52 AllowOverride None
53 Order allow,deny
54 Allow from all
55 </DirectoryMatch>
56 EOT
57 if [ -z "$1" ]; then
58 # Start Web server.
59 /etc/init.d/apache stop
60 /etc/init.d/apache start
61 fi
62 fi
63 fi
64 }