wok-next view shell-detector/receipt @ rev 20976

Follow recent changes in the Python renames
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Sep 25 17:35:51 2018 +0300 (2018-09-25)
parents e46969cce788
children d5aab818505e
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 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 #WGET_URL="https://github.com/emposha/PHP-Shell-Detector/tarball/master"
12 WGET_URL="git|git://github.com/emposha/PHP-Shell-Detector.git"
14 DEPENDS="php"
15 BUILD_DEPENDS="git"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 mkdir -p $install/usr/share/$PACKAGE
21 cp -a * $install/usr/share/$PACKAGE
22 ln -s shelldetect.php $install/usr/share/$PACKAGE/index.php
23 chown -R www.www $install/usr/share/$PACKAGE
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 cp -a $install/usr $fs
30 }
32 post_install()
33 {
34 # Configure lighttpd server
35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
36 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
37 sed -e "s|.*\"/examples/\" => \"/usr/share/examples/\",| \"/examples/\" => \"/usr/share/examples/\",\\n \"/$PACKAGE/\" => \"/usr/share/$PACKAGE/\",|g" -i "$1/etc/lighttpd/lighttpd.conf"
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
45 # Configure apache server
46 if [ -f "$1/etc/apache/httpd.conf" ]; then
47 if [ ! -f "$1/etc/apache/conf.d/$PACKAGE" ]; then
48 cat > "$1/etc/apache/conf.d/$PACKAGE" <<EOT
49 <IfModule mod_alias.c>
50 Alias /$PACKAGE /usr/share/$PACKAGE
51 </IfModule>
52 <DirectoryMatch /usr/share/$PACKAGE/>
53 DirectoryIndex index.php
54 Options +FollowSymLinks
55 AllowOverride None
56 Order allow,deny
57 Allow from all
58 </DirectoryMatch>
59 EOT
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/apache stop
63 /etc/init.d/apache start
64 fi
65 fi
66 fi
67 }